diff options
author | Jason Vas Dias <jvdias@redhat.com> | 2004-07-30 21:17:42 +0000 |
---|---|---|
committer | Jason Vas Dias <jvdias@redhat.com> | 2004-07-30 21:17:42 +0000 |
commit | 2c5cce6396655381d23dfd60bd1610b8d71390be (patch) | |
tree | 7cfc9ff434fa9059d842a2ffa89a38a472e0b1f5 /sysconfig | |
parent | b66243e735e324840d728e2d33190809265d5662 (diff) | |
download | initscripts-2c5cce6396655381d23dfd60bd1610b8d71390be.tar initscripts-2c5cce6396655381d23dfd60bd1610b8d71390be.tar.gz initscripts-2c5cce6396655381d23dfd60bd1610b8d71390be.tar.bz2 initscripts-2c5cce6396655381d23dfd60bd1610b8d71390be.tar.xz initscripts-2c5cce6396655381d23dfd60bd1610b8d71390be.zip |
fix for bug 125712: added change_resolv_conf function to network-functions; made ipup-post and ipdown-post invoke it
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifup-post | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post index 401d1e8c..adbe1b13 100755 --- a/sysconfig/network-scripts/ifup-post +++ b/sysconfig/network-scripts/ifup-post @@ -19,7 +19,7 @@ if [ "$PEERDNS" != "no" -o -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then [ -n "$MS_DNS1" ] && DNS1=$MS_DNS1 [ -n "$MS_DNS2" ] && DNS2=$MS_DNS2 if [ -n "$DNS1" ] && ! grep -q "^nameserver $DNS1" /etc/resolv.conf && - tr=`mktemp /tmp/resolv.XXXXXX` ; then + tr=`mktemp /tmp/XXXXXX` ; then # replace only the first two nameserver lines; cannot count on awk # and do not know if sed is capable of this... current_replacement="$DNS1" @@ -67,7 +67,7 @@ if [ "$PEERDNS" != "no" -o -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then # but set umask in case it doesn't exist! oldumask=`umask` umask 022 - cat $tr > /etc/resolv.conf + change_resolv_conf $tr rm -f $tr umask $oldumask fi |