]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/commitdiff
fix Slackware issue (netconfig is an unrelated tool, not relevant for resolv.conf...
authorDaniel Lenski <dlenski@gmail.com>
Tue, 10 Mar 2020 20:08:35 +0000 (20:08 +0000)
committerDaniel Lenski <dlenski@amazon.com>
Tue, 10 Mar 2020 20:26:23 +0000 (13:26 -0700)
Reports:

- https://github.com/dlenski/openconnect/issues/165#issuecomment-597286178
- https://www.linuxquestions.org/questions/slackware-14/vpnc-on-slackware-14-2-is-bringing-up-network-configuration-dialog-each-time-4175595447/#post5646866

vpnc-script

index c21f47978af53ac996d182bf9dd08a9d2096a306..a455181c433627cfdcf5b932566460663b759177 100755 (executable)
@@ -129,16 +129,22 @@ if [ -r /etc/openwrt_release ] && [ -n "$OPENWRT_INTERFACE" ]; then
        include /lib/network
        MODIFYRESOLVCONF=modify_resolvconf_openwrt
        RESTORERESOLVCONF=restore_resolvconf_openwrt
-elif [ -x /usr/bin/busctl ] && [ ${RESOLVEDENABLED} = 1 ]; then  # For systemd-resolved (version 229 and above)
+elif [ -x /usr/bin/busctl ] && [ ${RESOLVEDENABLED} = 1 ]; then
+       # For systemd-resolved (version 229 and above)
        MODIFYRESOLVCONF=modify_resolved_manager
        RESTORERESOLVCONF=restore_resolved_manager
-elif [ -x /sbin/resolvconf ]; then # Optional tool on Debian, Ubuntu, Gentoo and FreeBSD
+elif [ -x /sbin/resolvconf ]; then
+       # Optional tool on Debian, Ubuntu, Gentoo and FreeBSD
        MODIFYRESOLVCONF=modify_resolvconf_manager
        RESTORERESOLVCONF=restore_resolvconf_manager
-elif [ -x /sbin/netconfig ]; then # tool on Suse after 11.1
+elif [ -x /sbin/netconfig ] && [ ! -f /etc/slackware-version ]; then
+       # tool on Suse after 11.1
+       # Slackware's netconfig is an unrelated tool that should not be invoked here
+       # (see https://www.linuxquestions.org/questions/slackware-14/vpnc-on-slackware-14-2-is-bringing-up-network-configuration-dialog-each-time-4175595447/#post5646866)
        MODIFYRESOLVCONF=modify_resolvconf_suse_netconfig
        RESTORERESOLVCONF=restore_resolvconf_suse_netconfig
-elif [ -x /sbin/modify_resolvconf ]; then # Mandatory tool on Suse earlier than 11.1
+elif [ -x /sbin/modify_resolvconf ]; then
+       # Mandatory tool on Suse earlier than 11.1
        MODIFYRESOLVCONF=modify_resolvconf_suse
        RESTORERESOLVCONF=restore_resolvconf_suse
 elif [ -x /usr/sbin/unbound-control ] && /usr/sbin/unbound-control status > /dev/null 2>&1; then