diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2007-09-23 12:47:55 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2007-09-23 12:47:55 +0000 |
commit | bd519e53d3a3998dec48a0b3b03710dc3b0a0d27 (patch) | |
tree | ab7a5d0b3be78855fc16a148492c8f0aa4143be9 /security | |
parent | [newport] net/yate-devel (diff) |
- In managed mode the script does not return the proper value due to $?
is reset by the if command. Therefore, the script does not fail when
starts with broken configuration files
- While I'm here, use %%RC_SUBR%% instead of /etc/rc.subr
PR: ports/110320
Submitted by: Dominic Fandrey <lon_kamikaze at gmx.de>
Approved by: maintainer timeout (6 months)
Notes
Notes:
svn path=/head/; revision=199984
Diffstat (limited to 'security')
-rw-r--r-- | security/vpnc/Makefile | 2 | ||||
-rw-r--r-- | security/vpnc/files/vpnc.in | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/security/vpnc/Makefile b/security/vpnc/Makefile index c231b5202814..c91b1063ec92 100644 --- a/security/vpnc/Makefile +++ b/security/vpnc/Makefile @@ -7,7 +7,7 @@ PORTNAME= vpnc PORTVERSION= 0.4.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= security MASTER_SITES= http://www.unix-ag.uni-kl.de/~massar/vpnc/ diff --git a/security/vpnc/files/vpnc.in b/security/vpnc/files/vpnc.in index 283bbacc09c3..148fe60c8b84 100644 --- a/security/vpnc/files/vpnc.in +++ b/security/vpnc/files/vpnc.in @@ -20,7 +20,7 @@ : ${vpnc_conf_dir="%%PREFIX%%/etc"} : ${vpnc_record="$vpnc_pid_dir/vpnc.record"} -. /etc/rc.subr +. %%RC_SUBR%% name="vpnc" rcvar=`set_rcvar` @@ -43,9 +43,12 @@ vpnc_start() { current="$vpnc_conf_dir/$config" # Start vpnc. - if ! $command $current $vpnc_flags; then - status=$? - echo "Running 'vpnc $current $vpnc_flags' failed." + $command --local-port 0 $current $vpnc_flags + status=$? + if [ $status != 0 ]; then + # VPNC does not print a newline after an error. + echo + echo "Running 'vpnc $current --local-port 0 $vpnc_flags' failed." return $status fi |