From 4f578542e313051d0295645ab9d033c515aa0061 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 19 Aug 2004 05:23:23 +0000 Subject: fix up resolv.conf munging (#129921) --- sysconfig/network-scripts/network-functions | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'sysconfig/network-scripts') diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 8477ac11..a744d69a 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -220,10 +220,10 @@ set_hostname () if ! grep search /etc/resolv.conf >/dev/null 2>&1; then domain=`echo $1 | sed 's/^[^\.]*\.//'` rsctmp=`mktemp /tmp/XXXXXX`; - /bin/cp -fp /etc/resolv.conf /tmp/$rsctmp - echo "search $domain" >> /tmp/$rsctmp - change_resolv_conf /tmp/$rsctmp - /bin/rm -f /tmp/$rsctmp + cat /etc/resolv.conf > $rsctmp + echo "search $domain" >> $rsctmp + change_resolv_conf $rsctmp + /bin/rm -f $rsctmp fi } @@ -358,7 +358,6 @@ configure_ccwgroup_device () } # Invoke this when /etc/resolv.conf has changed: -# (see bugzilla #125712) change_resolv_conf () { s=''; @@ -380,8 +379,7 @@ change_resolv_conf () r=$? if [ $r -eq 0 ]; then /sbin/initlog -f local7 -p notice -n NET -s "$0 : updated /etc/resolv.conf"; - /sbin/service nscd condrestart >/dev/null 2>&1; # remove when nscd is fixed! - [ -e /var/lock/subsys/nscd ] && /usr/sbin/nscd -i hosts; # invalidate cache + [ -e /var/lock/subsys/nscd ] && /usr/sbin/nscd -i hosts return $?; fi; return $r; -- cgit v1.2.1