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-30 12:30:16 -0400
commitb3992eae03af46aefad352d746f32c39f95f6ce3 (patch)
tree907a0ae90d40e337f49152524b650e0c3ee80c73
parent8fc0f2605f4746c879b21d40d31b256e5775b682 (diff)
downloadinitscripts-b3992eae03af46aefad352d746f32c39f95f6ce3.tar
initscripts-b3992eae03af46aefad352d746f32c39f95f6ce3.tar.gz
initscripts-b3992eae03af46aefad352d746f32c39f95f6ce3.tar.bz2
initscripts-b3992eae03af46aefad352d746f32c39f95f6ce3.tar.xz
initscripts-b3992eae03af46aefad352d746f32c39f95f6ce3.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 15ec66c5..79669c0c 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