aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth4
-rwxr-xr-xsysconfig/network-scripts/ifdown-sit2
-rwxr-xr-xsysconfig/network-scripts/ifdown-tunnel2
-rwxr-xr-xsysconfig/network-scripts/ifup8
-rwxr-xr-xsysconfig/network-scripts/ifup-aliases18
-rwxr-xr-xsysconfig/network-scripts/ifup-ctc2
-rwxr-xr-xsysconfig/network-scripts/ifup-eth16
-rwxr-xr-xsysconfig/network-scripts/ifup-ipv628
-rwxr-xr-xsysconfig/network-scripts/ifup-sit6
-rwxr-xr-xsysconfig/network-scripts/ifup-tunnel4
10 files changed, 45 insertions, 45 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 530975c3..80b99544 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -39,13 +39,13 @@ if [ -n "${HWADDR}" -a -z "${MACADDR}" ]; then
if [ -n "${NEWCONFIG}" ]; then
eval $(LANG=C grep -F "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 314b91f1..39e9c50f 100755
--- a/sysconfig/network-scripts/ifdown-sit
+++ b/sysconfig/network-scripts/ifdown-sit
@@ -37,7 +37,7 @@ REALDEVICE=${DEVICE%%:*}
# 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 a1f643c7..2853a0a8 100755
--- a/sysconfig/network-scripts/ifdown-tunnel
+++ b/sysconfig/network-scripts/ifdown-tunnel
@@ -33,7 +33,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 0089f3e9..f2980b39 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -83,21 +83,21 @@ if [ "${VLAN}" = "yes" ] && [ "$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
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
@@ -121,7 +121,7 @@ if [ "${VLAN}" = "yes" ] && [ "$ISALIAS" = "no" ]; then
ip link add dev ${DEVICE} link ${PHYSDEV} type vlan id ${VID} ${FLAG_REORDER_HDR} ${FLAG_GVRP} || {
(/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 1312eede..6fa71921 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 ` (
@@ -169,7 +169,7 @@ function new_interface ()
MATCH='^[0-9A-Za-z_]*$'
if (LC_ALL=C; [[ ! "$DEVNUM" =~ $MATCH ]]); then
- echo $"error in $FILE: invalid alias number" >&2
+ net_log $"error in $FILE: invalid alias number"
return 1
fi
@@ -179,17 +179,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
@@ -256,7 +256,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 ";
@@ -267,7 +267,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
@@ -337,11 +337,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 514c102b..e268d7cc 100755
--- a/sysconfig/network-scripts/ifup-ctc
+++ b/sysconfig/network-scripts/ifup-ctc
@@ -33,7 +33,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 4d7b8aea..b81234d2 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -40,7 +40,7 @@ is_available ${REALDEVICE}
if [ -n "${HWADDR}" ]; then
FOUNDMACADDR=$(get_hwaddr ${REALDEVICE})
if [ "${FOUNDMACADDR}" != "${HWADDR}" -a "${FOUNDMACADDR}" != "${MACADDR}" ]; then
- echo $"Device ${DEVICE} has different MAC address than expected, ignoring."
+ net_log $"Device ${DEVICE} has different MAC address than expected, ignoring."
exit 1
fi
fi
@@ -48,7 +48,7 @@ fi
# If the device is a bridge, create it with brctl, if available.
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 [ ! -d /sys/class/net/${DEVICE}/bridge ]; then
@@ -61,7 +61,7 @@ fi
# If the device is a tap device, create it with tunctl, if available.
if [ "${TYPE}" = "Tap" ]; then
if [ ! -x /usr/sbin/tunctl ]; then
- echo $"Tap support not available: tunctl not found"
+ net_log $"Tap support not available: tunctl not found"
exit 1
fi
[ -n "${OWNER}" ] && OWNER="-u ${OWNER}"
@@ -71,9 +71,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
}
@@ -219,7 +219,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
@@ -250,13 +250,13 @@ else
if ! LC_ALL=C ip addr ls ${REALDEVICE} | LC_ALL=C grep -q "${ipaddr[$idx]}/${prefix[$idx]}" ; then
[ "${REALDEVICE}" != "lo" ] && \
if ! /sbin/arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${ipaddr[$idx]} ; then
- echo $"Error, some other host already uses address ${ipaddr[$idx]}."
+ net_log $"Error, some other host already uses address ${ipaddr[$idx]}."
exit 1
fi
if ! ip addr add ${ipaddr[$idx]}/${prefix[$idx]} \
brd ${broadcast[$idx]:-+} dev ${REALDEVICE} ${SCOPE} label ${DEVICE}; then
- echo $"Error adding address ${ipaddr[$idx]} for ${DEVICE}."
+ net_log $"Error adding address ${ipaddr[$idx]} for ${DEVICE}."
fi
fi
diff --git a/sysconfig/network-scripts/ifup-ipv6 b/sysconfig/network-scripts/ifup-ipv6
index 93a55d6e..478682fb 100755
--- a/sysconfig/network-scripts/ifup-ipv6
+++ b/sysconfig/network-scripts/ifup-ipv6
@@ -97,8 +97,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
@@ -114,8 +114,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
@@ -144,7 +144,7 @@ fi
if [ "$IPV6_PRIVACY" = "rfc3041" ]; then
/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"
+ net_log $"Cannot enable IPv6 privacy method '$IPV6_PRIVACY', not supported by kernel"
fi
fi
@@ -168,7 +168,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
@@ -195,7 +195,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
@@ -208,7 +208,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
@@ -223,7 +223,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
@@ -237,7 +237,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
@@ -273,7 +273,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
@@ -286,17 +286,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 6d1a8c79..498305b7 100755
--- a/sysconfig/network-scripts/ifup-sit
+++ b/sysconfig/network-scripts/ifup-sit
@@ -55,12 +55,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
@@ -68,7 +68,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 8fd631e5..c14e0658 100755
--- a/sysconfig/network-scripts/ifup-tunnel
+++ b/sysconfig/network-scripts/ifup-tunnel
@@ -46,14 +46,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