From a0108a37b9812049e76bc2405830ff8effcde5aa Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Tue, 27 Jul 2010 11:31:10 +0200 Subject: [PATCH 3/3] ifdown* - echo and log error messages via syslog --- sysconfig/network-scripts/ifdown | 2 +- sysconfig/network-scripts/ifdown-eth | 4 ++-- sysconfig/network-scripts/ifdown-sit | 2 +- sysconfig/network-scripts/ifdown-tunnel | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown index f308d31..300f569 100755 --- a/sysconfig/network-scripts/ifdown +++ b/sysconfig/network-scripts/ifdown @@ -30,7 +30,7 @@ if [ $UID != 0 ]; then exec /usr/sbin/usernetctl ${CONFIG} down fi fi - echo $"Users cannot control this device." >&2 + echo_log daemon.error ifdown $"Users cannot control this device." >&2 exit 1 fi diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index 19fc1f1..de0911f 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." + echo_log daemon.error ifdown-eth $"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." + echo_log daemon.error ifdown-eth $"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 041dc3c..404e824 100755 --- a/sysconfig/network-scripts/ifdown-sit +++ b/sysconfig/network-scripts/ifdown-sit @@ -37,7 +37,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" + echo_log daemon.error ifdown-sit $"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 a1f643c..ed04f3b 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." + echo_log daemon.error ifdown-tunnel $"Device '$DEVICE' isn't supported as a valid GRE device name." exit 1 fi -- 1.7.1