diff options
author | Bill Nottingham <notting@redhat.com> | 2006-08-07 14:25:41 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2006-08-07 14:25:41 +0000 |
commit | 02b7bcde84fe0e10870fef468b502416698f13b8 (patch) | |
tree | 5ccef51303f7e6f2228a7368290ca996fbcd0fd6 /sysconfig/network-scripts | |
parent | 605c498903e111a8aac7488756d77ff1ab797b9f (diff) | |
download | initscripts-02b7bcde84fe0e10870fef468b502416698f13b8.tar initscripts-02b7bcde84fe0e10870fef468b502416698f13b8.tar.gz initscripts-02b7bcde84fe0e10870fef468b502416698f13b8.tar.bz2 initscripts-02b7bcde84fe0e10870fef468b502416698f13b8.tar.xz initscripts-02b7bcde84fe0e10870fef468b502416698f13b8.zip |
whitespace cleanups
Diffstat (limited to 'sysconfig/network-scripts')
-rw-r--r-- | sysconfig/network-scripts/network-functions-ipv6 | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/sysconfig/network-scripts/network-functions-ipv6 b/sysconfig/network-scripts/network-functions-ipv6 index 3753e18a..8cfa9158 100644 --- a/sysconfig/network-scripts/network-functions-ipv6 +++ b/sysconfig/network-scripts/network-functions-ipv6 @@ -8,7 +8,7 @@ # You will find more information on the initscripts-ipv6 homepage at # http://www.deepspace6.net/projects/initscripts-ipv6.html # -# Version: 2005-09-22 +# Version: 2006-08-03 # # @@ -88,14 +88,14 @@ ipv6_log() { local priority="notice" ;; esac - + local fnawk="print \$$fn" local t="`echo $level | awk -F. "{ $fnawk }"`" if [ -n "$t" ]; then echo $"ERROR: [ipv6_log] Loglevel isn't valid '$level' (arg 2)" >/dev/stderr return 1 fi - + # Generate function text if [ -z "$name" ]; then local txt_name="" @@ -127,8 +127,8 @@ ipv6_log() { local txt_level=$"NOTICE " ;; esac - - [ -n "$txt_name" ] && local txt_name="$txt_name " + + [ -n "$txt_name" ] && local txt_name="$txt_name " if [ "$channel" = "stderr" ]; then echo "$txt_level: ${txt_name}${message}" >/dev/stderr @@ -178,7 +178,7 @@ ipv6_test() { return 2 else modprobe ipv6 - + if ! [ -f /proc/net/if_inet6 ]; then ipv6_log $"Kernel is not compiled with IPv6 support" crit $fn return 2 @@ -192,12 +192,12 @@ ipv6_test() { if ! [ -x /sbin/ip ]; then ipv6_log $"Utility 'ip' (package: iproute) doesn't exist or isn't executable - stop" crit $fn - return 2 + return 2 fi if ! [ -x /sbin/sysctl ]; then ipv6_log $"Utility 'sysctl' (package: procps) doesn't exist or isn't executable - stop" crit $fn - return 2 + return 2 fi return 0 @@ -285,7 +285,7 @@ ipv6_control_forwarding() { ipv6_log $"Forwarding control parameter isn't valid '$fw_control' (arg 1)" err $fn return 1 fi - + ipv6_test || return 2 if [ "$fw_control" = "yes" -o "$fw_control" = "on" ]; then @@ -298,12 +298,12 @@ ipv6_control_forwarding() { if [ -z "$fw_device" ]; then ipv6_exec_sysctl -w net.ipv6.conf.all.forwarding=$status >/dev/null 2>&1 fi - + # Per device control (not implemented in kernel) if [ -n "$fw_device" ]; then ipv6_log $"IPv6 forwarding per device cannot be controlled via sysctl - use netfilter6 instead" warn $fn fi - + return 0 } @@ -355,7 +355,7 @@ ipv6_add_route() { # Netlink: "No route to host" ipv6_log $"'No route to host' adding route '$networkipv6' via gateway '$gatewayipv6' through device '$device'" warn $fn return 3 - else + else ipv6_log $"Unknown error" warn $fn return 3 fi @@ -389,7 +389,7 @@ ipv6_del_route() { ipv6_test testonly || return 2 - # Test, whether given IPv6 address is valid + # Test, whether given IPv6 address is valid ipv6_test_ipv6_addr_valid $networkipv6 || return 1 ipv6_test_ipv6_addr_valid $gatewayipv6 || return 1 @@ -476,7 +476,7 @@ ipv6_enable_autotunnel() { 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 fi - + return 0 } @@ -502,7 +502,7 @@ ipv6_disable_autotunnel() { 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 - + ipv6_exec_ip link set sit0 down if ipv6_test_device_status sit0; then @@ -513,7 +513,7 @@ ipv6_disable_autotunnel() { fi return 0 -} +} ##### Interface configuration @@ -821,7 +821,7 @@ ipv6_test_ipv4_addr_global_usable() { /bin/ipcalc --network $testipv4addr_globalusable 255.255.0.0 | LC_ALL=C grep -q "NETWORK=192\.168\.0\.0" && return 10 # test 224.0.0.0/3 (multicast and reserved, broadcast) /bin/ipcalc --network $testipv4addr_globalusable 224.0.0.0 | LC_ALL=C grep -q "NETWORK=224\.0\.0\.0" && return 10 - + return 0 } @@ -1000,7 +1000,7 @@ ipv6_add_6to4_tunnel() { fi return $retval -} +} ## Configure all 6to4 tunneling down @@ -1070,7 +1070,7 @@ ipv6_del_6to4_tunnel() { ipv6_exec_ip route del unreach ${prefix6to4}::/48 return $retval -} +} ## Configure a static tunnel device up @@ -1086,7 +1086,7 @@ ipv6_add_tunnel_device() { local addressipv4tunnel=$2 local addressipv6local=$3 local addressipv4tunnellocal=$4 - + if [ -z "$device" ]; then ipv6_log $"Missing parameter 'device' (arg 1)" err $fn return 1 @@ -1154,7 +1154,7 @@ ipv6_add_tunnel_device() { fi return 0 -} +} ## Configure a static tunnel device down @@ -1187,7 +1187,7 @@ ipv6_del_tunnel_device() { if ipv6_test_device_status $device; then return 3 fi - else + else false fi fi @@ -1238,7 +1238,7 @@ ipv6_get_ipv4addr_of_tunnel() { fi ipv6_test testonly || return 2 - + ipv6_test_device_status $device if [ $? != 0 -a $? != 11 ]; then @@ -1264,7 +1264,7 @@ ipv6_get_ipv4addr_of_tunnel() { echo "$tunnel_local_ipv4addr" return 0 -} +} ## Get IPv4 address of a device @@ -1302,7 +1302,7 @@ ipv6_get_ipv4addr_of_device() { echo "$ipv4addr" return 0 -} +} ## Set IPv6 MTU for a device @@ -1341,7 +1341,7 @@ ipv6_set_mtu() { # Set value ipv6_exec_sysctl -w net.ipv6.conf.$device.mtu=$ipv6_mtu >/dev/null 2>&1 - + return 0 } @@ -1410,7 +1410,7 @@ ipv6_set_default_route() { if [ -z "$device" ]; then # Note: this can cause a warning and a not installed route, if given address is not reachable on the link ipv6_add_route ::/0 $addressgw - else + else ipv6_add_route ::/0 $addressgw $device fi elif [ -n "$device" ]; then @@ -1419,7 +1419,7 @@ ipv6_set_default_route() { # gateway device != specific given -> skip return 0 fi - + ipv6_test_route_requires_next_hop $device local result=$? @@ -1457,12 +1457,12 @@ ipv6_test_route_requires_next_hop() { ipv6_test testonly || return 2 ipv6_test_device_status $device - + if [ $? != 0 ]; then return 3 fi - if [ "$device" = "sit0" ]; then + if [ "$device" = "sit0" ]; then return 10 fi @@ -1470,7 +1470,7 @@ ipv6_test_route_requires_next_hop() { return 10 fi - return 0 + return 0 } @@ -1501,7 +1501,7 @@ ipv6_trigger_radvd() { # Take default local mechanism="SIGHUP" fi - + if [ -z "$pidfile" ]; then local pidfile="/var/run/radvd/radvd.pid" fi @@ -1526,7 +1526,7 @@ ipv6_trigger_radvd() { return 3 ;; esac - + # PID file needed? if [ "$action" = "SIGHUP" ]; then if ! [ -f "$pidfile" ]; then |