aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-01-19 23:14:24 +0000
committerBill Nottingham <notting@redhat.com>2000-01-19 23:14:24 +0000
commitb7041a44b63521174fc0afaf16b00c303de86c5d (patch)
treeb1c382bedd7f88243f8ce1c024f52d6b13ac7a4b /sysconfig/network-scripts
parente1bc61ae4dc4f3a344a4a58d22c77c71e403bab9 (diff)
downloadinitscripts-b7041a44b63521174fc0afaf16b00c303de86c5d.tar
initscripts-b7041a44b63521174fc0afaf16b00c303de86c5d.tar.gz
initscripts-b7041a44b63521174fc0afaf16b00c303de86c5d.tar.bz2
initscripts-b7041a44b63521174fc0afaf16b00c303de86c5d.tar.xz
initscripts-b7041a44b63521174fc0afaf16b00c303de86c5d.zip
don't munge resolv.conf if DNS1 is in there somewhere already
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifup-post2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post
index 4a3d459c..6c7d36c0 100755
--- a/sysconfig/network-scripts/ifup-post
+++ b/sysconfig/network-scripts/ifup-post
@@ -28,7 +28,7 @@ if [ -n "$NEEDHOSTNAME" -a "${DEVICE}" != lo -a "${DEVICETYPE}" != "ppp" -a "${D
eval `/bin/ipcalc --silent --hostname ${IPADDR}` && set_hostname $HOSTNAME
fi
-if [ "$PEERDNS" != no -a -n "$DNS1" ] &&
+if [ "$PEERDNS" != no -a -n "$DNS1" ] && ! grep -q "$DNS1" /etc/resolv.conf &&
tr=`mktemp /tmp/resolv.XXXXXX` ; then
# replace only the first two nameserver lines; cannot count on awk
# and do not know if sed is capable of this...