diff options
author | Bill Nottingham <notting@redhat.com> | 2011-03-25 16:17:16 -0400 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2011-06-01 15:23:35 +0200 |
commit | a31c0c7193710a608f8eb736664dd3f65219828d (patch) | |
tree | 8ba607485a51907e694224e0b80d6c14dce97093 | |
parent | d76206a4239527b0e046dec3d30d62e67f7d7466 (diff) | |
download | initscripts-a31c0c7193710a608f8eb736664dd3f65219828d.tar initscripts-a31c0c7193710a608f8eb736664dd3f65219828d.tar.gz initscripts-a31c0c7193710a608f8eb736664dd3f65219828d.tar.bz2 initscripts-a31c0c7193710a608f8eb736664dd3f65219828d.tar.xz initscripts-a31c0c7193710a608f8eb736664dd3f65219828d.zip |
Use net_log where appropriate.
Conflicts:
rc.d/init.d/network
sysconfig/network-scripts/ifup-aliases
sysconfig/network-scripts/ifup-eth
[Harald Hoyer <harald@redhat.com>: resolved conflicts]
-rw-r--r-- | ppp/ip-up.ipv6to4 | 12 | ||||
-rwxr-xr-x | rc.d/init.d/network | 2 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifdown-eth | 4 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifdown-sit | 2 | ||||
-rw-r--r-- | sysconfig/network-scripts/ifdown-tunnel | 2 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup | 8 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-aliases | 18 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-ctc | 2 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 14 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-ipv6 | 28 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-sit | 6 | ||||
-rw-r--r-- | sysconfig/network-scripts/ifup-tunnel | 4 |
12 files changed, 51 insertions, 51 deletions
diff --git a/ppp/ip-up.ipv6to4 b/ppp/ip-up.ipv6to4 index 0491ce7e..1bc4fe34 100644 --- a/ppp/ip-up.ipv6to4 +++ b/ppp/ip-up.ipv6to4 @@ -90,11 +90,11 @@ if [ "$IPV6TO4INIT" = "yes" ]; then if [ -n "$ipv4addr" ]; then # Test for non-global IPv4 address if ! ipv6_test_ipv4_addr_global_usable $ipv4addr; then - echo $"Given IPv4 address '$ipv4addr' is not globally usable" + net_log $"Given IPv4 address '$ipv4addr' is not globally usable" info valid6to4config="no" fi else - echo $"IPv6to4 configuration needs an IPv4 address on related interface or otherwise specified" + net_log $"IPv6to4 configuration needs an IPv4 address on related interface or otherwise specified" info valid6to4config="no" fi if [ -z "$IPV6TO4_RELAY" ]; then @@ -126,7 +126,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then if [ -n "$IPV6TO4_MTU" ]; then if [ $IPV6TO4_MTU -gt $tunnelmtu ]; then - echo $"Warning: configured MTU '$IPV6TO4_MTU' for 6to4 exceeds maximum limit of '$tunnelmtu', ignored" + net_log $"Warning: configured MTU '$IPV6TO4_MTU' for 6to4 exceeds maximum limit of '$tunnelmtu', ignored" warning else tunnelmtu=$IPV6TO4_MTU fi @@ -141,7 +141,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then # Add default route, if device matches if [ "$IPV6_DEFAULTDEV" = "tun6to4" ]; then if [ -n "$IPV6_DEFAULTGW" ]; then - echo $"Warning: interface 'tun6to4' does not support 'IPV6_DEFAULTGW', ignored" + net_log $"Warning: interface 'tun6to4' does not support 'IPV6_DEFAULTGW', ignored" warning fi ipv6_set_default_route $ipv6to4_relay tun6to4 fi @@ -189,10 +189,10 @@ if [ "$IPV6TO4INIT" = "yes" ]; then ipv6_add_addr_on_device ${dev} ${ipv6to4prefix}${suf} done else - echo $"Error occured while calculating the IPv6to4 prefix" + net_log $"Error occured while calculating the IPv6to4 prefix" fi else - echo $"radvd control enabled, but config is not complete" + net_log $"radvd control enabled, but config is not complete" fi fi fi diff --git a/rc.d/init.d/network b/rc.d/init.d/network index 198d8e03..50617aee 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -83,7 +83,7 @@ case "$1" in test -z "$VLAN_NAME_TYPE" && VLAN_NAME_TYPE=DEV_PLUS_VID_NO_PAD action $"Setting 802.1Q VLAN parameters: " /sbin/vconfig set_name_type "$VLAN_NAME_TYPE" else - echo $"No 802.1Q VLAN support available in kernel." + net_log $"No 802.1Q VLAN support available in kernel." fi ;; esac diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index 1ef0d442..e3282259 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -33,13 +33,13 @@ if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then if [ -n "${NEWCONFIG}" ]; then eval $(LANG=C fgrep "DEVICE=" $NEWCONFIG) else - echo $"Device ${DEVICE} has MAC address ${FOUNDMACADDR}, instead of configured address ${HWADDR}. Ignoring." + net_log $"Device ${DEVICE} has MAC address ${FOUNDMACADDR}, instead of configured address ${HWADDR}. Ignoring." exit 1 fi if [ -n "${NEWCONFIG}" -a "${NEWCONFIG##*/}" != "${CONFIG##*/}" -a "${DEVICE}" = "${REALDEVICE}" ]; then exec /sbin/ifdown ${NEWCONFIG} else - echo $"Device ${DEVICE} has MAC address ${FOUNDMACADDR}, instead of configured address ${HWADDR}. Ignoring." + net_log $"Device ${DEVICE} has MAC address ${FOUNDMACADDR}, instead of configured address ${HWADDR}. Ignoring." exit 1 fi fi diff --git a/sysconfig/network-scripts/ifdown-sit b/sysconfig/network-scripts/ifdown-sit index 89d26677..fd358f9d 100755 --- a/sysconfig/network-scripts/ifdown-sit +++ b/sysconfig/network-scripts/ifdown-sit @@ -43,7 +43,7 @@ REALDEVICE=`echo ${DEVICE} | sed 's/:.*//g'` # Generic tunnel device sit0 is not supported here if [ "$DEVICE" = "sit0" ]; then - echo $"Device '$DEVICE' isn't supported here, use IPV6_AUTOTUNNEL setting and restart (IPv6) networking" + net_log $"Device '$DEVICE' isn't supported here, use IPV6_AUTOTUNNEL setting and restart (IPv6) networking" exit 1 fi diff --git a/sysconfig/network-scripts/ifdown-tunnel b/sysconfig/network-scripts/ifdown-tunnel index 5aa6d542..3501df40 100644 --- a/sysconfig/network-scripts/ifdown-tunnel +++ b/sysconfig/network-scripts/ifdown-tunnel @@ -27,7 +27,7 @@ source_config # Generic tunnel devices are not supported here if [ "$DEVICE" = gre0 -o "$DEVICE" = tunl0 ]; then - echo $"Device '$DEVICE' isn't supported as a valid GRE device name." + net_log $"Device '$DEVICE' isn't supported as a valid GRE device name." exit 1 fi diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index 1a18feed..4f1f1721 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -72,14 +72,14 @@ if [ -x /sbin/vconfig -a "${VLAN}" = "yes" -a "$ISALIAS" = "no" ]; then VID=$(echo "${DEVICE}" | LC_ALL=C sed 's/^vlan0*//') # PHYSDEV should be set in ifcfg-vlan* file if test -z "$PHYSDEV"; then - echo $"PHYSDEV should be set for device ${DEVICE}" + net_log $"PHYSDEV should be set for device ${DEVICE}" exit 1 fi fi if [ -n "$VID" ]; then if [ ! -d /proc/net/vlan ]; then if ! modprobe 8021q >/dev/null 2>&1 ; then - echo $"No 802.1Q VLAN support available in kernel for device ${DEVICE}" + net_log $"No 802.1Q VLAN support available in kernel for device ${DEVICE}" exit 1 fi fi @@ -91,7 +91,7 @@ if [ -x /sbin/vconfig -a "${VLAN}" = "yes" -a "$ISALIAS" = "no" ]; then is_available ${PHYSDEV} || { if [ "$?" = "1" ] ; then - echo $"$alias device ${DEVICE} does not seem to be present, delaying initialization." + net_log $"$alias device ${DEVICE} does not seem to be present, delaying initialization." exit 1 else exit 0 @@ -107,7 +107,7 @@ if [ -x /sbin/vconfig -a "${VLAN}" = "yes" -a "$ISALIAS" = "no" ]; then /sbin/vconfig add ${PHYSDEV} ${VID} || { (/usr/bin/logger -p daemon.info -t ifup \ $"ERROR: could not add vlan ${VID} as ${DEVICE} on dev ${PHYSDEV}" &)& - echo $"ERROR: could not add vlan ${VID} as ${DEVICE} on dev ${PHYSDEV}" + net_log $"ERROR: could not add vlan ${VID} as ${DEVICE} on dev ${PHYSDEV}" exit 1 } fi diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases index 8b2dc732..5178b88a 100755 --- a/sysconfig/network-scripts/ifup-aliases +++ b/sysconfig/network-scripts/ifup-aliases @@ -125,7 +125,7 @@ eval ` ( # read defaults from the parent config file [ -f $PARENTCONFIG ] || { - echo $"Missing config file $PARENTCONFIG." >&2 + net_log $"Missing config file $PARENTCONFIG." exit 1 } eval ` ( @@ -168,7 +168,7 @@ function new_interface () DEVNUM=${DEVICE#*:} if (LC_ALL=C; [[ ! "$DEVNUM" =~ '^[0-9A-Za-z_]*$' ]]); then - echo $"error in $FILE: invalid alias number" >&2 + net_log $"error in $FILE: invalid alias number" >&2 return 1 fi @@ -178,17 +178,17 @@ function new_interface () "; if [ -n "$ipseen" ]; then - echo $"error in $FILE: already seen ipaddr $IPADDR in $ipseen" >&2 + net_log $"error in $FILE: already seen ipaddr $IPADDR in $ipseen" return 1 fi if [ -n "$devseen" ]; then - echo $"error in $FILE: already seen device $parent_device:$DEVNUM in $devseen" >&2 + net_log $"error in $FILE: already seen device $parent_device:$DEVNUM in $devseen" return 1 fi if [ -z "$DEVICE" -o -z "$IPADDR" ]; then - echo $"error in $FILE: didn't specify device or ipaddr" >&2 + net_log $"error in $FILE: didn't specify device or ipaddr" return 1 fi @@ -255,7 +255,7 @@ function new_interface () setup_this=yes fi if [ -n "$rdev_mark" -a "$rdev_mark" != "$newmark" ]; then - echo $"error in ifcfg-${parent_device}: files" >&2 + net_log $"error in ifcfg-${parent_device}: files" return 1 fi eval " rdev_${DEVNUM}_mark=\$newmark "; @@ -266,7 +266,7 @@ function new_interface () if [ -n "$rdevip" -a "$rdevip" != "${DEVNUM}" ]; then eval " mark_remove=\$rdev_${rdevip}_mark "; if [ -n "$mark_remove" -a "$mark_remove" != "remove" ]; then - echo $"error in ifcfg-${parent_device}: files" >&2 + net_log $"error in ifcfg-${parent_device}: files" return 1 fi if [ "$mark_remove" != "remove" ]; then @@ -336,11 +336,11 @@ for FILE in ifcfg-${parent_device}-range* ; do ipaddr_endnum=${IPADDR_END##*.} if [ "${IPADDR_START%.*}" != "${IPADDR_END%.*}" ]; then - echo $"error in $FILE: IPADDR_START and IPADDR_END don't agree" >&2; continue + net_log $"error in $FILE: IPADDR_START and IPADDR_END don't agree"; continue fi if [ $ipaddr_startnum -gt $ipaddr_endnum ]; then - echo $"error in $FILE: IPADDR_START greater than IPADDR_END" >&2; continue + net_log $"error in $FILE: IPADDR_START greater than IPADDR_END"; continue fi ipaddr_num=$ipaddr_startnum diff --git a/sysconfig/network-scripts/ifup-ctc b/sysconfig/network-scripts/ifup-ctc index f0cbe6da..61ebad89 100755 --- a/sysconfig/network-scripts/ifup-ctc +++ b/sysconfig/network-scripts/ifup-ctc @@ -35,7 +35,7 @@ timeout=0 while ! ping -w 30 -c 1 ${GATEWAY} &>/dev/null; do timeout=$(($timeout + 1)) if [ $timeout = 20 ]; then - echo $"ERROR: ${DEVICE} did not come up!" + net_log $"ERROR: ${DEVICE} did not come up!" break fi done diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 5532eca9..86e8b145 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -43,7 +43,7 @@ if [ -n "${HWADDR}" ]; then curdev=`get_device_by_hwaddr ${HWADDR}` if [ -n "$curdev" ]; then rename_device "${REALDEVICE}" "${HWADDR}" "${curdev}" || { - echo $"Device ${DEVICE} has different MAC address than expected, ignoring." + net_log $"Device ${DEVICE} has different MAC address than expected, ignoring." exit 1 } else @@ -55,7 +55,7 @@ fi if [ "${TYPE}" = "Bridge" ]; then if [ ! -x /usr/sbin/brctl ]; then - echo $"Bridge support not available: brctl not found" + net_log $"Bridge support not available: brctl not found" exit 1 fi if ! LC_ALL=C /usr/sbin/brctl show | LC_ALL=C grep -q "^${DEVICE} "; then @@ -75,9 +75,9 @@ fi # now check the real state is_available ${REALDEVICE} || { if [ -n "$alias" ]; then - echo $"$alias device ${DEVICE} does not seem to be present, delaying initialization." + net_log $"$alias device ${DEVICE} does not seem to be present, delaying initialization." else - echo $"Device ${DEVICE} does not seem to be present, delaying initialization." + net_log $"Device ${DEVICE} does not seem to be present, delaying initialization." fi exit 1 } @@ -241,7 +241,7 @@ else ip link set dev ${REALDEVICE} $(toggle_value arp $ARP) if ! ip link set dev ${REALDEVICE} up ; then - echo $"Failed to bring up ${DEVICE}." + net_log $"Failed to bring up ${DEVICE}." exit 1 fi @@ -265,12 +265,12 @@ else if ! LC_ALL=C ip addr ls ${REALDEVICE} | LC_ALL=C grep -q "${IPADDR}/${PREFIX}" ; then if ! arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${IPADDR} ; then - echo $"Error, some other host already uses address ${IPADDR}." + net_log $"Error, some other host already uses address ${IPADDR}." exit 1 fi if ! ip addr add ${IPADDR}/${PREFIX} \ brd ${BROADCAST:-+} dev ${REALDEVICE} ${SCOPE} label ${DEVICE}; then - echo $"Error adding address ${IPADDR} for ${DEVICE}." + net_log $"Error adding address ${IPADDR} for ${DEVICE}." fi fi diff --git a/sysconfig/network-scripts/ifup-ipv6 b/sysconfig/network-scripts/ifup-ipv6 index 24a2e307..6c98f727 100755 --- a/sysconfig/network-scripts/ifup-ipv6 +++ b/sysconfig/network-scripts/ifup-ipv6 @@ -100,8 +100,8 @@ if [ "$IPV6FORWARDING" = "yes" ]; then # Check, if global IPv6 forwarding was already set by global script if [ $ipv6_global_forwarding_current -ne 1 ]; then - echo $"Global IPv6 forwarding is enabled in configuration, but not currently enabled in kernel" - echo $"Please restart network with '/sbin/service network restart'" + net_log $"Global IPv6 forwarding is enabled in configuration, but not currently enabled in kernel" + net_log $"Please restart network with '/sbin/service network restart'" fi ipv6_local_forwarding=1 @@ -117,8 +117,8 @@ else # Check, if global IPv6 forwarding was already set by global script if [ $ipv6_global_forwarding_current -ne 0 ]; then - echo $"Global IPv6 forwarding is disabled in configuration, but not currently disabled in kernel" - echo $"Please restart network with '/sbin/service network restart'" + net_log $"Global IPv6 forwarding is disabled in configuration, but not currently disabled in kernel" + net_log $"Please restart network with '/sbin/service network restart'" fi ipv6_local_forwarding=0 @@ -147,7 +147,7 @@ fi if [ "$IPV6_PRIVACY" = "rfc3041" ]; then ipv6_exec_sysctl -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" + net_log $"Cannot enable IPv6 privacy method '$IPV6_PRIVACY', not supported by kernel" fi fi @@ -178,7 +178,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then ipv6_test_device_status tun6to4 if [ $? = 0 ]; then # device is already up - echo $"Device 'tun6to4' (from '$DEVICE') is already up, shutdown first" + net_log $"Device 'tun6to4' (from '$DEVICE') is already up, shutdown first" exit 1 fi @@ -205,7 +205,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then if [ -n "$ipv4addr" ]; then if ! ipv6_test_ipv4_addr_global_usable $ipv4addr; then - echo $"Given IPv4 address '$ipv4addr' is not globally usable" + net_log $"Given IPv4 address '$ipv4addr' is not globally usable" info valid6to4config="no" fi if [ -z "$IPV6TO4_RELAY" ]; then @@ -218,7 +218,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then valid6to4config="no" fi else - echo $"IPv6to4 configuration needs an IPv4 address on related interface or otherwise specified" + net_log $"IPv6to4 configuration needs an IPv4 address on related interface or otherwise specified" info valid6to4config="no" fi @@ -233,7 +233,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then if [ -n "$IPV6TO4_MTU" ]; then if [ $IPV6TO4_MTU -gt $tunnelmtu ]; then - echo $"Warning: configured MTU '$IPV6TO4_MTU' for 6to4 exceeds maximum limit of '$tunnelmtu', ignored" + net_log $"Warning: configured MTU '$IPV6TO4_MTU' for 6to4 exceeds maximum limit of '$tunnelmtu', ignored" warning else tunnelmtu=$IPV6TO4_MTU fi @@ -247,7 +247,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then # Add default route, if device matches if [ "$IPV6_DEFAULTDEV" = "tun6to4" ]; then if [ -n "$IPV6_DEFAULTGW" ]; then - echo $"Warning: interface 'tun6to4' does not support 'IPV6_DEFAULTGW', ignored" + net_log $"Warning: interface 'tun6to4' does not support 'IPV6_DEFAULTGW', ignored" warning fi ipv6_set_default_route $ipv6to4_relay tun6to4 fi @@ -283,7 +283,7 @@ if [ "$IPV6TO4INIT" = "yes" ]; then if [ "$IPV6_CONTROL_RADVD" = "yes" ]; then # RADVD is in use, so forwarding of IPv6 packets should be enabled, display warning if [ $ipv6_global_forwarding_current -ne 1 ]; then - echo $"Using 6to4 and RADVD IPv6 forwarding usually should be enabled, but it isn't" + net_log $"Using 6to4 and RADVD IPv6 forwarding usually should be enabled, but it isn't" warning fi if [ -n "$IPV6TO4_ROUTING" ]; then @@ -296,17 +296,17 @@ if [ "$IPV6TO4INIT" = "yes" ]; then ipv6_add_addr_on_device ${dev} ${ipv6to4prefix}${suf} done else - echo $"Error occurred while calculating the IPv6to4 prefix" + net_log $"Error occurred while calculating the IPv6to4 prefix" fi else - echo $"radvd control enabled, but config is not complete" + net_log $"radvd control enabled, but config is not complete" fi # Control running radvd ipv6_trigger_radvd up "$IPV6_RADVD_TRIGGER_ACTION" $IPV6_RADVD_PIDFILE fi else - echo $"6to4 configuration is not valid" + net_log $"6to4 configuration is not valid" exit 1 fi fi diff --git a/sysconfig/network-scripts/ifup-sit b/sysconfig/network-scripts/ifup-sit index 33f2553a..daac845b 100755 --- a/sysconfig/network-scripts/ifup-sit +++ b/sysconfig/network-scripts/ifup-sit @@ -59,12 +59,12 @@ ipv6_test || exit 1 # Generic tunnel device sit0 is not supported here if [ "$DEVICE" = "sit0" ]; then - echo $"Device '$DEVICE' isn't supported here, use IPV6_AUTOTUNNEL setting and restart (IPv6) networking" + net_log $"Device '$DEVICE' isn't supported here, use IPV6_AUTOTUNNEL setting and restart (IPv6) networking" exit 1 fi if [ -z "$IPV6TUNNELIPV4" ]; then - echo $"Missing remote IPv4 address of tunnel, configuration is not valid" + net_log $"Missing remote IPv4 address of tunnel, configuration is not valid" exit 1 fi @@ -72,7 +72,7 @@ fi ipv6_test_device_status $DEVICE if [ $? = 0 ]; then # device is already up - echo $"Device '$DEVICE' is already up, please shutdown first" + net_log $"Device '$DEVICE' is already up, please shutdown first" exit 1 fi diff --git a/sysconfig/network-scripts/ifup-tunnel b/sysconfig/network-scripts/ifup-tunnel index 9b35ceed..a14092a2 100644 --- a/sysconfig/network-scripts/ifup-tunnel +++ b/sysconfig/network-scripts/ifup-tunnel @@ -40,14 +40,14 @@ case "$TYPE" in /sbin/modprobe ipip ;; *) - echo $"Invalid tunnel type $TYPE" + net_log $"Invalid tunnel type $TYPE" exit 1 ;; esac # Generic tunnel devices are not supported here if [ "$DEVICE" = gre0 -o "$DEVICE" = tunl0 ]; then - echo $"Device '$DEVICE' isn't supported as a valid GRE device name." + net_log $"Device '$DEVICE' isn't supported as a valid GRE device name." exit 1 fi |