aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorehaupt <ehaupt@FreeBSD.org>2008-03-06 04:50:30 +0800
committerehaupt <ehaupt@FreeBSD.org>2008-03-06 04:50:30 +0800
commit0dd7148bc5d3120c18f363933cd12d86efe7e799 (patch)
tree4367b8378f17f10c2150f505b7fd259e535e05ab /security
parent348c57d7c587b480c660fe367c0d2aa39c5e72c0 (diff)
downloadfreebsd-ports-gnome-0dd7148bc5d3120c18f363933cd12d86efe7e799.tar.gz
freebsd-ports-gnome-0dd7148bc5d3120c18f363933cd12d86efe7e799.tar.zst
freebsd-ports-gnome-0dd7148bc5d3120c18f363933cd12d86efe7e799.zip
- Update RC script
- Bump PORTREVISION Submitted by: kamikaze@bsdforen.de (author of rc script)
Diffstat (limited to 'security')
-rw-r--r--security/vpnc/Makefile2
-rw-r--r--security/vpnc/files/vpnc.in21
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
}