aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2015-01-08 14:09:58 +0100
committerLukas Nykryn <lnykryn@redhat.com>2015-01-08 14:09:58 +0100
commit3d1f30095582f84206826f7ede970c45e5a6b5ba (patch)
tree741dab15ea29592eea7ab68d34586b1cdd3f0301 /sysconfig/network-scripts
parentbe35cef79aadb7bc31ba4fe81bcdc4aa66e451c2 (diff)
downloadinitscripts-3d1f30095582f84206826f7ede970c45e5a6b5ba.tar
initscripts-3d1f30095582f84206826f7ede970c45e5a6b5ba.tar.gz
initscripts-3d1f30095582f84206826f7ede970c45e5a6b5ba.tar.bz2
initscripts-3d1f30095582f84206826f7ede970c45e5a6b5ba.tar.xz
initscripts-3d1f30095582f84206826f7ede970c45e5a6b5ba.zip
ifdown-post: remove resolv.conf only in specific cases
Diffstat (limited to 'sysconfig/network-scripts')
-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