From 06993904f6b995be292530778d6776793f50776a Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Sun, 7 Dec 2014 00:58:11 -0600 Subject: [PATCH] network/openconnect: Fix vpnc-script's test for /sbin/netconfig Date: Mon, 8 Sep 2014 23:14:19 +0100 From: higuita To: rworkman@slackbuilds.org Subject: openconnect slackbuild I used your openconnect slackbuild to install it on my machine and found a annoying problem. The vpnc-script installed by openconnect script tried to reconfigure slackware network configs files (rc.inet1.conf, hosts, resolv.conf and others) because it is testing the existence of /sbin/netconfig and use it... the problem is that is trying to use it as the SuSE netconfig and is totally weird to get the slackware netconfig vpn connection. Any user that don't cancel it might mess up his network config without knowning The solution is the attached patch, that bypass that test on slackware machines. I will submit this also to the openconnect so they can merge it too... but until that, please change the slackbuild to apply this. If you like, i can send a patch for the slackbuild too Also, version on the slackbuild is 5.01 and openconnect is already in version 6.00 and it works fine here... so no problem in update it also. -- Signed-off-by: Robby Workman --- network/openconnect/openconnect.SlackBuild | 2 +- network/openconnect/vpnc-script | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/network/openconnect/openconnect.SlackBuild b/network/openconnect/openconnect.SlackBuild index 2c54662dab..bbfd574d23 100644 --- a/network/openconnect/openconnect.SlackBuild +++ b/network/openconnect/openconnect.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=openconnect VERSION=${VERSION:-5.03} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then diff --git a/network/openconnect/vpnc-script b/network/openconnect/vpnc-script index 11cdc3240f..96b6863e61 100644 --- a/network/openconnect/vpnc-script +++ b/network/openconnect/vpnc-script @@ -124,7 +124,7 @@ if [ -r /etc/openwrt_release ] && [ -n "$OPENWRT_INTERFACE" ]; then elif [ -x /sbin/resolvconf ]; then # Optional tool on Debian, Ubuntu, Gentoo MODIFYRESOLVCONF=modify_resolvconf_manager RESTORERESOLVCONF=restore_resolvconf_manager -elif [ -x /sbin/netconfig ]; then # tool on Suse after 11.1 +elif [ -x /sbin/netconfig-suse ] && [ ! -f /etc/slackware-version ]; then # tool on Suse after 11.1 MODIFYRESOLVCONF=modify_resolvconf_suse_netconfig RESTORERESOLVCONF=restore_resolvconf_suse_netconfig elif [ -x /sbin/modify_resolvconf ]; then # Mandatory tool on Suse earlier than 11.1