- Update RC script

- Bump PORTREVISION

Submitted by:	kamikaze@bsdforen.de (author of rc script)
This commit is contained in:
Emanuel Haupt 2008-03-05 20:50:30 +00:00
parent 52ec88fef9
commit 812acba32e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=208477
2 changed files with 11 additions and 12 deletions

View File

@ -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/ \

View File

@ -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
}