aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Lautrbach <plautrba@redhat.com>2011-01-14 15:34:39 +0100
committerPetr Lautrbach <plautrba@redhat.com>2011-01-14 15:34:39 +0100
commitbcc304450cc6c92e2eff57143f27b6c78990651c (patch)
tree6423c78a22bed170feece704db5ee391009f8e97
parentf1db9810c3fda50c887e33e83e80f767476dd446 (diff)
downloadinitscripts-bcc304450cc6c92e2eff57143f27b6c78990651c.tar
initscripts-bcc304450cc6c92e2eff57143f27b6c78990651c.tar.gz
initscripts-bcc304450cc6c92e2eff57143f27b6c78990651c.tar.bz2
initscripts-bcc304450cc6c92e2eff57143f27b6c78990651c.tar.xz
initscripts-bcc304450cc6c92e2eff57143f27b6c78990651c.zip
use SYSCTLDEVICE without . (#667211, <notting@redhat.com>)
-rwxr-xr-xsysconfig/network-scripts/ifdown-ipv66
-rwxr-xr-xsysconfig/network-scripts/ifup-eth2
-rwxr-xr-xsysconfig/network-scripts/ifup-ipv68
-rw-r--r--sysconfig/network-scripts/network-functions1
-rw-r--r--sysconfig/network-scripts/network-functions-ipv66
5 files changed, 12 insertions, 11 deletions
diff --git a/sysconfig/network-scripts/ifdown-ipv6 b/sysconfig/network-scripts/ifdown-ipv6
index e174ec90..9f04531a 100755
--- a/sysconfig/network-scripts/ifdown-ipv6
+++ b/sysconfig/network-scripts/ifdown-ipv6
@@ -64,9 +64,9 @@ if [ $? != 0 -a $? != 11 ]; then
fi
# Switch some sysctls to secure mode
-/sbin/sysctl -e -w net.ipv6.conf.$DEVICE.forwarding=0 >/dev/null 2>&1
-/sbin/sysctl -e -w net.ipv6.conf.$DEVICE.accept_ra=0 >/dev/null 2>&1
-/sbin/sysctl -e -w net.ipv6.conf.$DEVICE.accept_redirects=0 >/dev/null 2>&1
+/sbin/sysctl -e -w net.ipv6.conf.$SYSCTLDEVICE.forwarding=0 >/dev/null 2>&1
+/sbin/sysctl -e -w net.ipv6.conf.$SYSCTLDEVICE.accept_ra=0 >/dev/null 2>&1
+/sbin/sysctl -e -w net.ipv6.conf.$SYSCTLDEVICE.accept_redirects=0 >/dev/null 2>&1
# Test status of tun6to4 device
ipv6_test_device_status tun6to4
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index 2c664382..e37ac739 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -266,7 +266,7 @@ else
fi
if [ -n "$SRCADDR" ]; then
- sysctl -w "net.ipv4.conf.${REALDEVICE}.arp_filter=1" >/dev/null 2>&1
+ sysctl -w "net.ipv4.conf.${SYSCTLDEVICE}.arp_filter=1" >/dev/null 2>&1
fi
# update ARP cache of neighboring computers
diff --git a/sysconfig/network-scripts/ifup-ipv6 b/sysconfig/network-scripts/ifup-ipv6
index 29ba8af2..da1062ec 100755
--- a/sysconfig/network-scripts/ifup-ipv6
+++ b/sysconfig/network-scripts/ifup-ipv6
@@ -124,9 +124,9 @@ else
ipv6_local_auto=0
fi
fi
-/sbin/sysctl -e -w net.ipv6.conf.$DEVICE.forwarding=$ipv6_local_forwarding >/dev/null 2>&1
-/sbin/sysctl -e -w net.ipv6.conf.$DEVICE.accept_ra=$ipv6_local_auto >/dev/null 2>&1
-/sbin/sysctl -e -w net.ipv6.conf.$DEVICE.accept_redirects=$ipv6_local_auto >/dev/null 2>&1
+/sbin/sysctl -e -w net.ipv6.conf.$SYSCTLDEVICE.forwarding=$ipv6_local_forwarding >/dev/null 2>&1
+/sbin/sysctl -e -w net.ipv6.conf.$SYSCTLDEVICE.accept_ra=$ipv6_local_auto >/dev/null 2>&1
+/sbin/sysctl -e -w net.ipv6.conf.$SYSCTLDEVICE.accept_redirects=$ipv6_local_auto >/dev/null 2>&1
# Set IPv6 MTU, if given
if [ -n "$IPV6_MTU" ]; then
@@ -142,7 +142,7 @@ fi
# Enable IPv6 RFC3041 privacy extensions if desired
if [ "$IPV6_PRIVACY" = "rfc3041" ]; then
- /sbin/sysctl -e -w net.ipv6.conf.$DEVICE.use_tempaddr=2 >/dev/null 2>&1
+ /sbin/sysctl -e -w net.ipv6.conf.$SYSCTLDEVICE.use_tempaddr=2 >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo $"Cannot enable IPv6 privacy method '$IPV6_PRIVACY', not supported by kernel"
fi
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 01419fc0..9abf1772 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -135,6 +135,7 @@ source_config ()
[ -z "$DEVICETYPE" ] && DEVICETYPE=$(echo ${DEVICE} | sed "s/[0-9]*$//")
[ -z "$REALDEVICE" -a -n "$PARENTDEVICE" ] && REALDEVICE=$PARENTDEVICE
[ -z "$REALDEVICE" ] && REALDEVICE=${DEVICE%%:*}
+ [ -z "$SYSCTLDEVICE" ] && SYSCTLDEVICE=${REALDEVICE/.//}
if [ "${DEVICE}" != "${REALDEVICE}" ]; then
ISALIAS=yes
else
diff --git a/sysconfig/network-scripts/network-functions-ipv6 b/sysconfig/network-scripts/network-functions-ipv6
index 6af9c8cb..24100cba 100644
--- a/sysconfig/network-scripts/network-functions-ipv6
+++ b/sysconfig/network-scripts/network-functions-ipv6
@@ -765,9 +765,9 @@ ipv6_add_tunnel_device() {
fi
# Set sysctls proper (regardless "default")
- /sbin/sysctl -e -w net.ipv6.conf.$device.forwarding=1 >/dev/null 2>&1
- /sbin/sysctl -e -w net.ipv6.conf.$device.accept_ra=0 >/dev/null 2>&1
- /sbin/sysctl -e -w net.ipv6.conf.$device.accept_redirects=0 >/dev/null 2>&1
+ /sbin/sysctl -e -w net.ipv6.conf.$SYSCTLDEVICE.forwarding=1 >/dev/null 2>&1
+ /sbin/sysctl -e -w net.ipv6.conf.$SYSCTLDEVICE.accept_ra=0 >/dev/null 2>&1
+ /sbin/sysctl -e -w net.ipv6.conf.$SYSCTLDEVICE.accept_redirects=0 >/dev/null 2>&1
if [ -n "$addressipv6local" ]; then
# Setup P-t-P address