[packages] tinc: fix init.d/tinc parameter generation and logfile config name
tinc expects long parameters to be in the form "--name=value" and the current init scripts generate "--name value" parameters. See `tincd --help` to confirm. Also, the config/tinc and init.d/tinc incorrectly use the parameter "log" when it should be "logfile". Signed-off-by: Sandy McArthur, Jr. <Sandy@McArthur.org> git-svn-id: svn://svn.openwrt.org/openwrt/packages@36508 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
0f28460a01
commit
b8c4b0401d
@ -4,7 +4,7 @@ config tinc-net NETNAME
|
|||||||
## Daemon Configuration (cmd arguments)
|
## Daemon Configuration (cmd arguments)
|
||||||
#option generate_keys 0
|
#option generate_keys 0
|
||||||
#option key_size 2048
|
#option key_size 2048
|
||||||
#option log /tmp/log/tinc.NETNAME.log
|
#option logfile /tmp/log/tinc.NETNAME.log
|
||||||
#option debug 3
|
#option debug 3
|
||||||
|
|
||||||
## Server Configuration (tinc.conf)
|
## Server Configuration (tinc.conf)
|
||||||
|
@ -42,7 +42,7 @@ append_params() {
|
|||||||
config_get v "$s" "$p"
|
config_get v "$s" "$p"
|
||||||
IFS="$LIST_SEP"
|
IFS="$LIST_SEP"
|
||||||
for v in $v; do
|
for v in $v; do
|
||||||
[ -n "$v" ] && append_param "$p" && ARGS="$ARGS $v"
|
[ -n "$v" ] && append_param "$p" && ARGS="$ARGS=$v"
|
||||||
done
|
done
|
||||||
unset IFS
|
unset IFS
|
||||||
done
|
done
|
||||||
@ -169,7 +169,7 @@ start_instance() {
|
|||||||
ARGS=""
|
ARGS=""
|
||||||
|
|
||||||
# append params
|
# append params
|
||||||
append_params "$s" log debug
|
append_params "$s" logfile debug
|
||||||
|
|
||||||
SERVICE_PID_FILE="/var/run/tinc.$s.pid"
|
SERVICE_PID_FILE="/var/run/tinc.$s.pid"
|
||||||
service_start $BIN -c "$TMP_TINC/$s" -n $s $ARGS --pidfile="$SERVICE_PID_FILE"
|
service_start $BIN -c "$TMP_TINC/$s" -n $s $ARGS --pidfile="$SERVICE_PID_FILE"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user