aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions-ipv6
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2006-08-02 15:23:05 +0000
committerBill Nottingham <notting@redhat.com>2006-08-02 15:23:05 +0000
commitb272a188dd8231a1c0bba27fb08b8acf93d738e8 (patch)
tree761af8a129791b924e29f7d5e4ac23d9686af79e /sysconfig/network-scripts/network-functions-ipv6
parentc7a016ff99dfa1264b2a355e3aa06a51190d225b (diff)
downloadinitscripts-b272a188dd8231a1c0bba27fb08b8acf93d738e8.tar
initscripts-b272a188dd8231a1c0bba27fb08b8acf93d738e8.tar.gz
initscripts-b272a188dd8231a1c0bba27fb08b8acf93d738e8.tar.bz2
initscripts-b272a188dd8231a1c0bba27fb08b8acf93d738e8.tar.xz
initscripts-b272a188dd8231a1c0bba27fb08b8acf93d738e8.zip
IPv6 updates (<pb@bieringer.de>, #143452)
Diffstat (limited to 'sysconfig/network-scripts/network-functions-ipv6')
-rw-r--r--sysconfig/network-scripts/network-functions-ipv622
1 files changed, 20 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/network-functions-ipv6 b/sysconfig/network-scripts/network-functions-ipv6
index 5800274c..5b4e0f29 100644
--- a/sysconfig/network-scripts/network-functions-ipv6
+++ b/sysconfig/network-scripts/network-functions-ipv6
@@ -137,6 +137,11 @@ ipv6_log() {
fi
;;
'syslog')
+ # note: logger resides in /usr/bin, but not used by default
+ if ! [ -x logger ]; then
+ echo $"ERROR: [ipv6_log] Syslog is chosen, but binary 'logger' doesn't exist or isn't executable" >/dev/stderr
+ return 3
+ fi
if [ -z "$txt_name" ]; then
logger -p $facility.$priority $message
else
@@ -185,6 +190,16 @@ ipv6_test() {
return 2
fi
+ if ! [ -x /sbin/ip ]; then
+ ipv6_log $"Utility 'ip' (package: iproute) doesn't exist or isn't executable - stop" crit $fn
+ 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
+ fi
+
return 0
}
@@ -194,6 +209,7 @@ ipv6_test() {
getversion_ipv6_functions() {
local version_ipv6_functions="`cat /etc/sysconfig/network-scripts/network-functions-ipv6 | LC_ALL=C grep "^# Version:" | awk '{ print $3 }' | sed 's/-//g' | sed 's/[A-Za-z]*$//g'`"
echo $version_ipv6_functions
+ return 0
}
@@ -202,6 +218,8 @@ getversion_ipv6_functions() {
# $*: <arguments...>
# return code: result of execution
ipv6_exec_ifconfig() {
+ local fn="ipv6_exec_ifconfig"
+
local options=$*
LC_ALL=C /sbin/ifconfig $options
@@ -614,7 +632,7 @@ ipv6_cleanup_6to4_device() {
ipv6_del_addr_on_device ${dev} ${addr}
done
- # Get all IPv6 routes through given interface via a given gateway and remove them
+ # Get all IPv6 routes through given interface related to 6to4 and remove them
ipv6_exec_ip -6 route show dev $device | LC_ALL=C grep "^2002:" | while read ipv6net dummy; do
ipv6_del_route $ipv6net :: $device
done
@@ -698,7 +716,7 @@ ipv6_test_ipv6_addr_valid() {
local address_implicit="`echo $testipv6addr_valid | awk -F/ '{ print $1 }'`"
# Test for a valid format
- if ! echo "$address_implicit" | LC_ALL=C egrep -q '^[[:xdigit:]:.]*$'; then
+ if ! echo "$address_implicit" | LC_ALL=C egrep -q '^[[:xdigit:]]|[:\.]*$'; then
if [ "$modequiet" != "quiet" ]; then
ipv6_log $"Given IPv6 address '$testipv6addr_valid' is not valid" err $fn
fi