diff options
author | Bill Nottingham <notting@redhat.com> | 2004-08-19 05:23:23 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2004-08-19 05:23:23 +0000 |
commit | 4f578542e313051d0295645ab9d033c515aa0061 (patch) | |
tree | 488deda392dc523a98c4dab54eb7f414fd5d8ba9 /sysconfig | |
parent | 42c738eeb7a48eba758d77a5ca0a7097713bb841 (diff) | |
download | initscripts-4f578542e313051d0295645ab9d033c515aa0061.tar initscripts-4f578542e313051d0295645ab9d033c515aa0061.tar.gz initscripts-4f578542e313051d0295645ab9d033c515aa0061.tar.bz2 initscripts-4f578542e313051d0295645ab9d033c515aa0061.tar.xz initscripts-4f578542e313051d0295645ab9d033c515aa0061.zip |
fix up resolv.conf munging (#129921)
Diffstat (limited to 'sysconfig')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 12 |
1 files changed, 5 insertions, 7 deletions
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; |