aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown-post
diff options
context:
space:
mode:
authorDavid Kaspar [Dee'Kej] <dkaspar@redhat.com>2017-03-21 17:21:53 +0100
committerDee'Kej <deekej@linuxmail.org>2017-03-22 14:42:25 +0100
commitc5917b856db1e32a863fa78b54d5a7533c99577a (patch)
tree5c37be58edf2a5a036f0d81083f398b5da9490eb /sysconfig/network-scripts/ifdown-post
parent9ab04edfb16c30f9bb03b1227b60cc751a692876 (diff)
downloadinitscripts-c5917b856db1e32a863fa78b54d5a7533c99577a.tar
initscripts-c5917b856db1e32a863fa78b54d5a7533c99577a.tar.gz
initscripts-c5917b856db1e32a863fa78b54d5a7533c99577a.tar.bz2
initscripts-c5917b856db1e32a863fa78b54d5a7533c99577a.tar.xz
initscripts-c5917b856db1e32a863fa78b54d5a7533c99577a.zip
9.70-sync: sysconfig/network-scripts/* updated - part 2
This commit contains a lot of whitespace changes. Use 'git diff --ignore-all-space' to display the relevant changes.
Diffstat (limited to 'sysconfig/network-scripts/ifdown-post')
-rwxr-xr-xsysconfig/network-scripts/ifdown-post38
1 files changed, 20 insertions, 18 deletions
diff --git a/sysconfig/network-scripts/ifdown-post b/sysconfig/network-scripts/ifdown-post
index 0f2285fc..8b56e14f 100755
--- a/sysconfig/network-scripts/ifdown-post
+++ b/sysconfig/network-scripts/ifdown-post
@@ -19,32 +19,34 @@ source_config
/etc/sysconfig/network-scripts/ifdown-routes ${REALDEVICE} ${DEVNAME}
if [ "$PEERDNS" != "no" -o -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ] && \
- [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" -o -n "${DNS1}" -o "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ] ; then
- if [ -f /etc/resolv.conf.save ]; then
- change_resolv_conf /etc/resolv.conf.save
- rm -f /etc/resolv.conf.save
- fi
- if [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" ]; then
- if [ -f /etc/ppp/peers/$DEVICE ] ; then
- rm -f /etc/ppp/peers/$DEVICE
- fi
+ [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" -o -n "${DNS1}" \
+ -o "${BOOTPROTO}" = "bootp" -o "${BOOTPROTO}" = "dhcp" ] ; then
+if [ -f /etc/resolv.conf.save ]; then
+ change_resolv_conf /etc/resolv.conf.save
+ rm -f /etc/resolv.conf.save
+fi
+if [ "${DEVICETYPE}" = "ppp" -o "${DEVICETYPE}" = "ippp" ]; then
+ if [ -f /etc/ppp/peers/$DEVICE ] ; then
+ rm -f /etc/ppp/peers/$DEVICE
fi
fi
+fi
# Reset the default route if this interface had a special one
if ! check_default_route ; then
# ISDN device needs special handling dial on demand
- if [ "${DEVICETYPE}" = "ippp" -o "${DEVICETYPE}" = "isdn" ] && [ "$DIALMODE" = "auto" ] ; then
- if [ -z "$GATEWAY" ] ; then
- /sbin/ip route add default ${METRIC:+metric} \
- ${WINDOW:+window $WINDOW} dev ${DEVICE}
- else
- /sbin/ip route add default ${METRIC:+metric} \
- ${WINDOW:+window $WINDOW} via ${GATEWAY}
- fi
+ if [ "${DEVICETYPE}" = "ippp" -o "${DEVICETYPE}" = "isdn" ] && \
+ [ "$DIALMODE" = "auto" ] ; then
+ if [ -z "$GATEWAY" ] ; then
+ /sbin/ip route add default ${METRIC:+metric} \
+ ${WINDOW:+window $WINDOW} dev ${DEVICE}
else
- add_default_route ${DEVICE}
+ /sbin/ip route add default ${METRIC:+metric} \
+ ${WINDOW:+window $WINDOW} via ${GATEWAY}
fi
+else
+ add_default_route ${DEVICE}
+fi
fi
# Inform firewall