SVN: rc-scripts/trunk/lib/ifup

baggins baggins at pld-linux.org
Sun May 20 10:35:04 CEST 2012


Author: baggins
Date: Sun May 20 10:35:04 2012
New Revision: 12568

Modified:
   rc-scripts/trunk/lib/ifup
Log:
- fix sysctl setting for interfaces with dot in name, patch by Adam Osuchowski <adwol>


Modified: rc-scripts/trunk/lib/ifup
==============================================================================
--- rc-scripts/trunk/lib/ifup	(original)
+++ rc-scripts/trunk/lib/ifup	Sun May 20 10:35:04 2012
@@ -24,6 +24,8 @@
 # device name must be ifcfg-somename
 DEV=$1
 
+SYSCTLDEVICE=$(echo ${DEVICE} | sed 's/\./\//g')
+
 [ -z "$DEV" ] && {
 	nls "Usage: %s <device name>" "ifup" >&2
 	exit 1
@@ -118,7 +120,7 @@
 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 @@
 
 # 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


More information about the pld-cvs-commit mailing list