diff options
author | dinoex <dinoex@FreeBSD.org> | 2008-12-30 22:04:59 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2008-12-30 22:04:59 +0800 |
commit | 98e7551d6c3b8b0d3b35627755b4d9de5b75f11a (patch) | |
tree | a2e5cd5c6afafcfaa2ce5383957c7f5823e5c1ec /security/tinc | |
parent | 8dbba85c4aac2a1a53e10f4f28b80771db168e02 (diff) | |
download | freebsd-ports-gnome-98e7551d6c3b8b0d3b35627755b4d9de5b75f11a.tar.gz freebsd-ports-gnome-98e7551d6c3b8b0d3b35627755b4d9de5b75f11a.tar.zst freebsd-ports-gnome-98e7551d6c3b8b0d3b35627755b4d9de5b75f11a.zip |
- fix reload and restart targets
Submitted by:i igor <soft[at]antrax-energo.msk.ru>
Diffstat (limited to 'security/tinc')
-rw-r--r-- | security/tinc/files/tincd.sh.in | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/security/tinc/files/tincd.sh.in b/security/tinc/files/tincd.sh.in index c23aa6a81f28..b17d53c639ff 100644 --- a/security/tinc/files/tincd.sh.in +++ b/security/tinc/files/tincd.sh.in @@ -1,9 +1,9 @@ #!/bin/sh # -# PROVIDE: tinc +# PROVIDE: tincd # REQUIRE: ipfilter FILESYSTEMS sysctl netif -# BEFORE: SERVERS +# BEFORE: SERVERS routing # KEYWORD: nojail # Define these tincd_* variables in one of these files: @@ -22,7 +22,7 @@ rcvar=`set_rcvar` command="%%PREFIX%%/sbin/tincd" start_cmd="tincd_start" stop_cmd="tincd_stop" -reload_cmd="tincd_restart" +reload_cmd="tincd_reload" extra_commands="reload" procname=${command:-tincd} @@ -30,14 +30,14 @@ load_rc_config $name tincd_start() { - if test -z $tincd_cfg + if test -z "${tincd_cfg}" then echo "Starting tincd" $command else - echo "Starting tincd for: $tincd_cfg" - for cfg in $tincd_cfg + for cfg in ${tincd_cfg} do + echo "Starting tincd for: ${cfg}" $command -n $cfg done fi @@ -46,36 +46,33 @@ tincd_start() # Resync ipfilter /etc/rc.d/ipfilter resync fi - if [ -f /etc/rc.d/bridge -a -n "$cmdifn" ] ; then - /etc/rc.d/bridge start $cmdifn - fi - } tincd_stop() { - if test -z $tincd_cfg + if test -z "${tincd_cfg}" then echo "Stopping tincd" $command -k else - echo "Stopping tincd for: $tincd_cfg" + echo "Stopping tincd for: " for cfg in $tincd_cfg do + echo "Stopping tincd for: ${cfg}" $command -n $cfg -k done fi } -tincd_restart() +tincd_reload() { - if test -z $tincd_cfg + if test -z "${tincd_cfg}" then echo "Sending HUP to tincd" - $command -k HUP + $command --kill=HUP else - echo "Sending HUP tincd for: $tincd_cfg" for cfg in $tincd_cfg do - $command -n $cfg -k HUP + echo "Sending HUP to tincd for: ${cfg}" + $command -n $cfg --kill=HUP done fi } |