From 20be05d00725373ed03c3e45b808cebf93f8e08a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sun, 20 May 2012 08:35:04 +0000 Subject: [PATCH] - fix sysctl setting for interfaces with dot in name, patch by Adam Osuchowski svn-id: @12568 --- lib/ifup | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ifup b/lib/ifup index d0dd0447..da9da7b0 100755 --- a/lib/ifup +++ b/lib/ifup @@ -24,6 +24,8 @@ need_hostname # device name must be ifcfg-somename DEV=$1 +SYSCTLDEVICE=$(echo ${DEVICE} | sed 's/\./\//g') + [ -z "$DEV" ] && { nls "Usage: %s " "ifup" >&2 exit 1 @@ -118,7 +120,7 @@ if [ -n "$MTU" ]; then fi if is_yes "${IPV6_NETWORKING}" && is_yes "${IPV6_DISABLE_AUTOCONF}"; then - run_cmd "Disabling IPv6 autoconfiguration" sysctl -w net.ipv6.conf.${DEVICE}.autoconf=0 + run_cmd "Disabling IPv6 autoconfiguration" sysctl -w net.ipv6.conf.${SYSCTLDEVICE}.autoconf=0 fi if is_wireless_device "${DEVICE}"; then @@ -232,7 +234,7 @@ fi # device have to have ip address set before if is_yes "$PROXYARP"; then - run_cmd "$(nls 'Enabling proxy ARP on %s' "${DEVICE}")" sysctl -w net.ipv4.conf.${DEVICE}.proxy_arp=1 + run_cmd "$(nls 'Enabling proxy ARP on %s' "${DEVICE}")" sysctl -w net.ipv4.conf.${SYSCTLDEVICE}.proxy_arp=1 fi if [ "$HANDLING" = "3" ]; then -- 2.44.0