aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2011-03-25 16:34:04 -0400
committerBill Nottingham <notting@redhat.com>2011-03-25 16:34:04 -0400
commit69ce2dbdc74c2c9af855bb85ce3c7302608ee4b7 (patch)
treed96c5666227681d7958fd4ba52998f86997b74ea
parent5bb9c661652d0836f47ac47fcac15248ada1ab05 (diff)
downloadinitscripts-69ce2dbdc74c2c9af855bb85ce3c7302608ee4b7.tar
initscripts-69ce2dbdc74c2c9af855bb85ce3c7302608ee4b7.tar.gz
initscripts-69ce2dbdc74c2c9af855bb85ce3c7302608ee4b7.tar.bz2
initscripts-69ce2dbdc74c2c9af855bb85ce3c7302608ee4b7.tar.xz
initscripts-69ce2dbdc74c2c9af855bb85ce3c7302608ee4b7.zip
Add an error when setting gateway fails. (#672202)
-rwxr-xr-xsysconfig/network-scripts/ifup-eth6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index b81234d2..5d3ee29b 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -278,10 +278,12 @@ else
if [ -n "${GATEWAY}" ] && [ "$(ipcalc --network ${GATEWAY} ${netmask[0]} 2>/dev/null)" = "NETWORK=${NETWORK}" ]; then
ip route replace default ${METRIC:+metric $METRIC} \
via ${GATEWAY} ${WINDOW:+window $WINDOW} ${SRC} \
- ${GATEWAYDEV:+dev $GATEWAYDEV}
+ ${GATEWAYDEV:+dev $GATEWAYDEV} ||
+ net_log $"Error adding default gateway ${GATEWAY} for ${DEVICE}."
elif [ "${GATEWAYDEV}" = "${DEVICE}" ]; then
ip route replace default ${METRIC:+metric $METRIC} \
- ${SRC} ${WINDOW:+window $WINDOW} dev ${REALDEVICE}
+ ${SRC} ${WINDOW:+window $WINDOW} dev ${REALDEVICE} ||
+ net_log $"Erorr adding default gateway for ${REALDEVICE}."
fi
fi
fi