diff options
author | Emanuel Haupt <ehaupt@FreeBSD.org> | 2008-03-05 20:50:30 +0000 |
---|---|---|
committer | Emanuel Haupt <ehaupt@FreeBSD.org> | 2008-03-05 20:50:30 +0000 |
commit | 812acba32ecd4f9f4c6fc7c5dfe480ba48a2f0d6 (patch) | |
tree | f96dbd11af1a0c0ad6fd17f74f338a83f76fa4c2 /security/vpnc | |
parent | 52ec88fef9cfd7ac34068c50c02761f25e8d7e23 (diff) | |
download | ports-812acba32ecd4f9f4c6fc7c5dfe480ba48a2f0d6.tar.gz ports-812acba32ecd4f9f4c6fc7c5dfe480ba48a2f0d6.zip |
Notes
Diffstat (limited to 'security/vpnc')
-rw-r--r-- | security/vpnc/Makefile | 2 | ||||
-rw-r--r-- | security/vpnc/files/vpnc.in | 21 |
2 files changed, 11 insertions, 12 deletions
diff --git a/security/vpnc/Makefile b/security/vpnc/Makefile index 8fbc4863547a..822102fb901f 100644 --- a/security/vpnc/Makefile +++ b/security/vpnc/Makefile @@ -7,7 +7,7 @@ PORTNAME= vpnc PORTVERSION= 0.5.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= security MASTER_SITES= http://www.unix-ag.uni-kl.de/~massar/vpnc/ \ http://critical.ch/distfiles/ \ diff --git a/security/vpnc/files/vpnc.in b/security/vpnc/files/vpnc.in index 148fe60c8b84..094f15f68f50 100644 --- a/security/vpnc/files/vpnc.in +++ b/security/vpnc/files/vpnc.in @@ -1,7 +1,7 @@ #!/bin/sh # # Author: kamikaze -# Contact: LoN_Kamikaze@gmx.de +# Contact: kamikaze@bsdforen.de # # If vpnc_conf is defined, it will be treated as a list of configuration files # in vpnc_conf_dir. This managed mode is useful where where vpnc tunnels have @@ -43,25 +43,24 @@ vpnc_start() { current="$vpnc_conf_dir/$config" # Start vpnc. - $command --local-port 0 $current $vpnc_flags - status=$? - if [ $status != 0 ]; then + if ! $command --local-port 0 $current $vpnc_flags; then + status=$? # VPNC does not print a newline after an error. echo echo "Running 'vpnc $current --local-port 0 $vpnc_flags' failed." return $status fi - # Move files to allow a clean shutdown + # Wait for the system to catch up. + /bin/sleep 2 + + # Copy files to allow a clean shutdown # of multiple connections. - /bin/mv "$vpnc_pid_dir/vpnc.pid" "$vpnc_pid_dir/vpnc.$config.pid" - /bin/mv "$vpnc_pid_dir/vpnc.defaultroute" "$vpnc_pid_dir/vpnc.$config.defaultroute" 2> /dev/null - /bin/mv "$vpnc_pid_dir/vpnc.resolv.conf-backup" "$vpnc_pid_dir/vpnc.$config.resolv.conf-backup" 2> /dev/null + /bin/cp "$vpnc_pid_dir/vpnc.pid" "$vpnc_pid_dir/vpnc.$config.pid" + /bin/cp "$vpnc_pid_dir/vpnc.defaultroute" "$vpnc_pid_dir/vpnc.$config.defaultroute" 2> /dev/null + /bin/cp "$vpnc_pid_dir/vpnc.resolv.conf-backup" "$vpnc_pid_dir/vpnc.$config.resolv.conf-backup" 2> /dev/null echo "$config" >> "$vpnc_record" - - # Wait for the system to catch up. - /bin/sleep 1 done } |