From 4ac5634c50af48bbcfc0cf517531601785a0c44b Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 4 Jan 2011 16:02:35 -0500 Subject: Catch these uses of sysctl too. --- sysconfig/network-scripts/init.ipv6-global | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sysconfig/network-scripts/init.ipv6-global b/sysconfig/network-scripts/init.ipv6-global index a4eed208..da1c1742 100755 --- a/sysconfig/network-scripts/init.ipv6-global +++ b/sysconfig/network-scripts/init.ipv6-global @@ -66,12 +66,13 @@ case $ACTION in # Reset IPv6 sysctl switches for "all", "default" and still existing devices for i in /proc/sys/net/ipv6/conf/* ; do interface=${i##*/} + sinterface=${interface/.//} # Host/Router behaviour for the interface - /sbin/sysctl -e -w net.ipv6.conf.$interface.forwarding=$ipv6_global_forwarding >/dev/null 2>&1 + /sbin/sysctl -e -w net.ipv6.conf.$sinterface.forwarding=$ipv6_global_forwarding >/dev/null 2>&1 # Autoconfiguration and redirect handling for Hosts - /sbin/sysctl -e -w net.ipv6.conf.$interface.accept_ra=$ipv6_global_auto >/dev/null 2>&1 - /sbin/sysctl -e -w net.ipv6.conf.$interface.accept_redirects=$ipv6_global_auto >/dev/null 2>&1 + /sbin/sysctl -e -w net.ipv6.conf.$sinterface.accept_ra=$ipv6_global_auto >/dev/null 2>&1 + /sbin/sysctl -e -w net.ipv6.conf.$sinterface.accept_redirects=$ipv6_global_auto >/dev/null 2>&1 done ;; @@ -132,12 +133,13 @@ case $ACTION in for i in /proc/sys/net/ipv6/conf/* ; do interface=${i##*/} + sinterface=${interface/.//} # Assume Host behaviour - /sbin/sysctl -e -w net.ipv6.conf.$interface.forwarding=0 >/dev/null 2>&1 + /sbin/sysctl -e -w net.ipv6.conf.$sinterface.forwarding=0 >/dev/null 2>&1 # Disable autoconfiguration and redirects - /sbin/sysctl -e -w net.ipv6.conf.$interface.accept_ra=0 >/dev/null 2>&1 - /sbin/sysctl -e -w net.ipv6.conf.$interface.accept_redirects=0 >/dev/null 2>&1 + /sbin/sysctl -e -w net.ipv6.conf.$sinterface.accept_ra=0 >/dev/null 2>&1 + /sbin/sysctl -e -w net.ipv6.conf.$sinterface.accept_redirects=0 >/dev/null 2>&1 done # Cleanup still existing tunnel devices -- cgit v1.2.1