diff options
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-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; |