Fix handling of /etc/resolv.conf during connect/disconnect. Now that FreeBSD 9.x

has a script called /sbin/resolvconf it tried to use the Debian, Ubuntu, Gentoo
syntax which is incompatible with FreeBSD's version of the script and will
therefore fail.

Feature safe:	yes
This commit is contained in:
Emanuel Haupt 2011-11-10 21:52:29 +00:00
parent 84509f9c28
commit e1ef09c096
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=285477
2 changed files with 15 additions and 4 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= vpnc
PORTVERSION= 0.5.3
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= security
MASTER_SITES= http://www.unix-ag.uni-kl.de/~massar/vpnc/ \
CRITICAL

View file

@ -1,5 +1,5 @@
--- vpnc-script.in.orig 2008-11-24 00:18:37.000000000 +0100
+++ vpnc-script.in 2008-11-24 00:21:54.000000000 +0100
--- vpnc-script.in.orig 2008-11-19 21:55:51.000000000 +0100
+++ vpnc-script.in 2011-11-10 22:41:12.000000000 +0100
@@ -48,8 +48,8 @@
OS="`uname -s`"
@ -11,7 +11,18 @@
FULL_SCRIPTNAME=@PREFIX@/sbin/vpnc
SCRIPTNAME=`basename $FULL_SCRIPTNAME`
@@ -420,11 +420,13 @@
@@ -73,7 +73,9 @@
route_syntax_netmask="-netmask"
fi
-if [ -x /sbin/resolvconf ]; then # Optional tool on Debian, Ubuntu, Gentoo
+# Optional tool on Debian, Ubuntu, Gentoo, FreeBSD 9.0-RELEASE has a different,
+# incompatible /sbin/resolvconf implementation
+if [ -x /sbin/resolvconf ] && [ "$OS" = "Linux" ]; then
MODIFYRESOLVCONF=modify_resolvconf_manager
RESTORERESOLVCONF=restore_resolvconf_manager
elif [ -x /sbin/modify_resolvconf ]; then # Mandatory tool on Suse earlier than 11.1
@@ -420,11 +422,13 @@
fi
fi
elif [ "$OS" = "FreeBSD" ]; then