From 3d1f30095582f84206826f7ede970c45e5a6b5ba Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Thu, 8 Jan 2015 14:09:58 +0100 Subject: ifdown-post: remove resolv.conf only in specific cases --- sysconfig/network-scripts/ifdown-post | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sysconfig') 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 -- cgit v1.2.1