diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2015-01-08 14:09:58 +0100 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2015-01-08 14:09:58 +0100 |
commit | 3d1f30095582f84206826f7ede970c45e5a6b5ba (patch) | |
tree | 741dab15ea29592eea7ab68d34586b1cdd3f0301 /sysconfig/network-scripts | |
parent | be35cef79aadb7bc31ba4fe81bcdc4aa66e451c2 (diff) | |
download | initscripts-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-x | sysconfig/network-scripts/ifdown-post | 3 |
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 |