diff options
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 9b495b9a..7c34370c 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -219,10 +219,7 @@ set_hostname () hostname $1 if ! grep search /etc/resolv.conf >/dev/null 2>&1; then domain=`echo $1 | sed 's/^[^\.]*\.//'` - /bin/cp -fp /etc/resolv.conf /tmp/set_hostname_resolv.conf - echo "search $domain" >> /tmp/set_hostname_resolv.conf - change_resolv_conf /tmp/set_hostname_resolv.conf - /bin/rm -f /tmp/set_hostname_resolv.conf + echo "search $domain" >> /etc/resolv.conf fi } @@ -355,34 +352,3 @@ configure_ccwgroup_device () echo "$PORTNAME" > $SYSDIR/portname [ -e $SYSDIR/online ] && echo 1 > $SYSDIR/online } - -# Invoke this when /etc/resolv.conf has changed: -# (see bugzilla #125712) -change_resolv_conf () -{ - s=''; - if [ $# -gt 1 ]; then - let n_args=$#; - while [ $n_args -gt 0 ]; - do - s="$s$1"; - shift; - if [ $# -gt 0 ]; then - s="$s\n"; - fi; - let n_args=n_args-1; - done; - elif [ $# -eq 1 ]; then - s=`/bin/cat $1`; - fi; - /bin/chmod +w /etc/resolv.conf - (echo -e "$s" > /etc/resolv.conf;) >/dev/null 2>&1; - /bin/chmod a-w /etc/resolv.conf - r=$? - if [ $r -eq 0 ]; then - /usr/bin/logger -p local0.notice -t NET "$0 : updated /etc/resolv.conf"; - /sbin/service nscd condrestart >/dev/null 2>&1; - return $?; - fi; - return $r; -} |