aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2015-01-08 14:09:58 +0100
committerLukas Nykryn <lnykryn@redhat.com>2016-05-26 16:03:27 +0200
commitc471fb25f02d2e595995e7c884bbdbfe3b19ef78 (patch)
tree44a640aeb5983ec056823209231cf64f7baa5845
parent0962f3135f3d449b88ee89cd131aa225f4ffe6e7 (diff)
downloadinitscripts-c471fb25f02d2e595995e7c884bbdbfe3b19ef78.tar
initscripts-c471fb25f02d2e595995e7c884bbdbfe3b19ef78.tar.gz
initscripts-c471fb25f02d2e595995e7c884bbdbfe3b19ef78.tar.bz2
initscripts-c471fb25f02d2e595995e7c884bbdbfe3b19ef78.tar.xz
initscripts-c471fb25f02d2e595995e7c884bbdbfe3b19ef78.zip
ifdown-post: remove resolv.conf only in specific cases
Cherry-picked from: 3d1f30095582f84206826f7ede970c45e5a6b5ba Resolves: #1273435
-rwxr-xr-xsysconfig/network-scripts/ifdown-post3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown-post b/sysconfig/network-scripts/ifdown-post
index bcf47654..0f2285fc 100755
--- a/sysconfig/network-scripts/ifdown-post
+++ b/sysconfig/network-scripts/ifdown-post
@@ -18,7 +18,8 @@ source_config
/etc/sysconfig/network-scripts/ifdown-routes ${REALDEVICE} ${DEVNAME}
-if [ "$PEERDNS" != "no" -o -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then
+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