aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2015-01-08 14:09:58 +0100
committerLukas Nykryn <lnykryn@redhat.com>2015-02-04 15:17:20 +0100
commit7034c3859ae2f64075b11e37d3898e5edd1a3b22 (patch)
treea24b302d6ca7d288adac8aaf4172ec51792c8897 /sysconfig
parentbe5044b30c5d7ef3dc115f6e1670b1e1477dfb25 (diff)
downloadinitscripts-7034c3859ae2f64075b11e37d3898e5edd1a3b22.tar
initscripts-7034c3859ae2f64075b11e37d3898e5edd1a3b22.tar.gz
initscripts-7034c3859ae2f64075b11e37d3898e5edd1a3b22.tar.bz2
initscripts-7034c3859ae2f64075b11e37d3898e5edd1a3b22.tar.xz
initscripts-7034c3859ae2f64075b11e37d3898e5edd1a3b22.zip
ifdown-post: remove resolv.conf only in specific cases
Diffstat (limited to 'sysconfig')
-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 0a1b938a..702c00bb 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