Luka, I tried your suggestion as it made sense but when I tried the extra quoting of:
[ -n "$v" ] && append_param "$p" && ARGS="$ARGS=\"$v\"" I get the error: # /etc/init.d/tinc start Could not open log file "/tmp/log/tinc.thelans.log-test": No such file or directory The patch I sent was discovered in my attempt to get Tinc working as described here: https://forum.openwrt.org/viewtopic.php?id=43869 (I could still use some help.) Without my patch using these relevant config settings: config tinc-net thelans option log /tmp/log/tinc.thelans.log-test option debug 3 I get: # ps w | grep tinc 9587 root 3128 S /usr/sbin/tincd -c /tmp/tinc/thelans -n thelans --log /tmp/log/tinc.thelans.log-test --debug 3 --pidfile=/var/run/tin # head -n 1 /tmp/log/tinc.thelans.log-test head: /tmp/log/tinc.thelans.log-test: No such file or directory # ls /tmp/log/tinc.* /tmp/log/tinc.thelans.log # head -n 1 /tmp/log/tinc.thelans.log 2013-04-30 12:14:15 tinc.thelans[9587]: tincd 1.0.19 (Mar 14 2013 12:15:49) starting, debug level 1 Note that the log file name was not used and the start of the log file indicates a debug level of 1. `tincd --help` says "-d, --debug[=LEVEL] Increase debug level or set it to LEVEL." which means the "--debug 3" only increased the debug level by one. With the patch I suggested using this relevant config: config tinc-net thelans option logfile /tmp/log/tinc.thelans.log-test option debug 3 I get: # ps w | grep tinc 9665 root 3128 S /usr/sbin/tincd -c /tmp/tinc/thelans -n thelans --logfile=/tmp/log/tinc.thelans.log-test --debug=3 --pidfile=/var/run # head -n 1 /tmp/log/tinc.thelans.log-test 2013-04-30 12:19:43 tinc.thelans[9665]: tincd 1.0.19 (Mar 14 2013 12:15:49) starting, debug level 3 Note that the log file name was used and the debug level was set to 3 as specified in the config file. After collecting the examples above I thought to test if --log=/tmp/log/tinc.thelans.log-test worked and it does seem to. I still feel it's best to use --logfile as that is what the tinc help/docs say to use. Relevant tinc docs: http://www.tinc-vpn.org/documentation/tinc_5.html#Runtime-options or # tincd --help Usage: tincd [option]... -c, --config=DIR Read configuration options from DIR. -D, --no-detach Don't fork and detach. -d, --debug[=LEVEL] Increase debug level or set it to LEVEL. -k, --kill[=SIGNAL] Attempt to kill a running tincd and exit. -n, --net=NETNAME Connect to net NETNAME. -K, --generate-keys[=BITS] Generate public/private RSA keypair. -L, --mlock Lock tinc into main memory. --logfile[=FILENAME] Write log entries to a logfile. --pidfile=FILENAME Write PID to FILENAME. -o, --option=[HOST.]KEY=VALUE Set global/host configuration value. -R, --chroot chroot to NET dir at startup. -U, --user=USER setuid to given USER at startup. --help Display this help and exit. --version Output version information and exit. On Tue, Apr 30, 2013 at 3:47 AM, Luka Perkov <l...@openwrt.org> wrote: > Hi Sandy, > > On Mon, Apr 29, 2013 at 11:00:00PM -0400, Sandy McArthur Jr wrote: >> tinc expects long parameters to be in the form "--name=value" and the >> current init scripts generate "--name value" parameters. > > I don't think that matters. Also look bellow... > >>+++ b/net/tinc/files/tinc.init >>@@ -42,7 +42,7 @@ append_params() { >> config_get v "$s" "$p" >> IFS="$LIST_SEP" >> for v in $v; do >>- [ -n "$v" ] && append_param "$p" && ARGS="$ARGS $v" >>+ [ -n "$v" ] && append_param "$p" && ARGS="$ARGS=$v" > > If we are going to nitpick I would say it should be done like this: > > [ -n "$v" ] && append_param "$p" && ARGS="$ARGS=\"$v\"" > >> done >> unset IFS >> done > > Luka -- Sandy McArthur, Jr. "No nation could preserve its freedom in the midst of continual warfare." - Letters and Other Writings of James Madison (1865), Vol. IV, p. 491 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel