aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions-ipv6
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-07-31 18:29:02 -0400
committerBill Nottingham <notting@redhat.com>2009-07-31 21:00:12 -0400
commite966000b6970353a6b3cf62cbd2459812ad4076c (patch)
tree3c21eed4e7a540aeaae90136117b272e1ec471ea /sysconfig/network-scripts/network-functions-ipv6
parentdff38eba0c24eab360421883dfbd0e17f7b25243 (diff)
downloadinitscripts-e966000b6970353a6b3cf62cbd2459812ad4076c.tar
initscripts-e966000b6970353a6b3cf62cbd2459812ad4076c.tar.gz
initscripts-e966000b6970353a6b3cf62cbd2459812ad4076c.tar.bz2
initscripts-e966000b6970353a6b3cf62cbd2459812ad4076c.tar.xz
initscripts-e966000b6970353a6b3cf62cbd2459812ad4076c.zip
Remove useless sysctl wrapper function.
/sbin/sysctl doesn't even *have* locale support.
Diffstat (limited to 'sysconfig/network-scripts/network-functions-ipv6')
-rw-r--r--sysconfig/network-scripts/network-functions-ipv635
1 files changed, 11 insertions, 24 deletions
diff --git a/sysconfig/network-scripts/network-functions-ipv6 b/sysconfig/network-scripts/network-functions-ipv6
index b7531a64..0e96fd51 100644
--- a/sysconfig/network-scripts/network-functions-ipv6
+++ b/sysconfig/network-scripts/network-functions-ipv6
@@ -229,19 +229,6 @@ ipv6_exec_ip() {
return $?
}
-
-## sysctl
-# $*: <arguments...>
-# return code: result of execution
-ipv6_exec_sysctl() {
- local options=$*
-
- LC_ALL=C /sbin/sysctl -e $options
-
- return $?
-}
-
-
##### Control IPv6 forwarding
# Control IPv6 forwarding
@@ -274,7 +261,7 @@ ipv6_control_forwarding() {
# Global control? (if no device is given)
if [ -z "$fw_device" ]; then
- ipv6_exec_sysctl -w net.ipv6.conf.all.forwarding=$status >/dev/null 2>&1
+ /sbin/sysctl -e -w net.ipv6.conf.all.forwarding=$status >/dev/null 2>&1
fi
# Per device control (not implemented in kernel)
@@ -450,9 +437,9 @@ ipv6_enable_autotunnel() {
fi
# Set sysctls proper (regardless "default")
- ipv6_exec_sysctl -w net.ipv6.conf.sit0.forwarding=1 >/dev/null 2>&1
- ipv6_exec_sysctl -w net.ipv6.conf.sit0.accept_ra=0 >/dev/null 2>&1
- ipv6_exec_sysctl -w net.ipv6.conf.sit0.accept_redirects=0 >/dev/null 2>&1
+ /sbin/sysctl -e -w net.ipv6.conf.sit0.forwarding=1 >/dev/null 2>&1
+ /sbin/sysctl -e -w net.ipv6.conf.sit0.accept_ra=0 >/dev/null 2>&1
+ /sbin/sysctl -e -w net.ipv6.conf.sit0.accept_redirects=0 >/dev/null 2>&1
fi
return 0
@@ -477,9 +464,9 @@ ipv6_disable_autotunnel() {
true
else
# take down basic tunnel device
- ipv6_exec_sysctl -w net.ipv6.conf.sit0.forwarding=0 >/dev/null 2>&1
- ipv6_exec_sysctl -w net.ipv6.conf.sit0.accept_ra=0 >/dev/null 2>&1
- ipv6_exec_sysctl -w net.ipv6.conf.sit0.accept_redirects=0 >/dev/null 2>&1
+ /sbin/sysctl -e -w net.ipv6.conf.sit0.forwarding=0 >/dev/null 2>&1
+ /sbin/sysctl -e -w net.ipv6.conf.sit0.accept_ra=0 >/dev/null 2>&1
+ /sbin/sysctl -e -w net.ipv6.conf.sit0.accept_redirects=0 >/dev/null 2>&1
ipv6_exec_ip link set sit0 down
@@ -996,7 +983,7 @@ ipv6_add_tunnel_device() {
ipv6_test || return 2
if ! ipv6_test_device_status $device; then
- local ttldefault="$(ipv6_exec_sysctl net.ipv4.ip_default_ttl | awk '{ print $3 }')"
+ local ttldefault="$(/sbin/sysctl -e net.ipv4.ip_default_ttl | awk '{ print $3 }')"
if [ -z "$ttldefault" ]; then
local ttldefault=64
fi
@@ -1030,9 +1017,9 @@ ipv6_add_tunnel_device() {
fi
# Set sysctls proper (regardless "default")
- ipv6_exec_sysctl -w net.ipv6.conf.$device.forwarding=1 >/dev/null 2>&1
- ipv6_exec_sysctl -w net.ipv6.conf.$device.accept_ra=0 >/dev/null 2>&1
- ipv6_exec_sysctl -w net.ipv6.conf.$device.accept_redirects=0 >/dev/null 2>&1
+ /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
if [ -n "$addressipv6local" ]; then
# Setup P-t-P address