aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-post
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-08-30 19:12:52 +0000
committerBill Nottingham <notting@redhat.com>2004-08-30 19:12:52 +0000
commit2d6c8a3ee15ae8b1c68fbc6e6e36d2d321ee95fe (patch)
treef3e44b3a83f107356ed45206b4d3d93243dbfc6a /sysconfig/network-scripts/ifup-post
parente79afc6a208be15c65e511fb76dd509368f920be (diff)
downloadinitscripts-2d6c8a3ee15ae8b1c68fbc6e6e36d2d321ee95fe.tar
initscripts-2d6c8a3ee15ae8b1c68fbc6e6e36d2d321ee95fe.tar.gz
initscripts-2d6c8a3ee15ae8b1c68fbc6e6e36d2d321ee95fe.tar.bz2
initscripts-2d6c8a3ee15ae8b1c68fbc6e6e36d2d321ee95fe.tar.xz
initscripts-2d6c8a3ee15ae8b1c68fbc6e6e36d2d321ee95fe.zip
move to right branchr7-31-17-EL
Diffstat (limited to 'sysconfig/network-scripts/ifup-post')
-rwxr-xr-xsysconfig/network-scripts/ifup-post6
1 files changed, 2 insertions, 4 deletions
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post
index 401d1e8c..77b678bc 100755
--- a/sysconfig/network-scripts/ifup-post
+++ b/sysconfig/network-scripts/ifup-post
@@ -19,9 +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
- # replace only the first two nameserver lines; cannot count on awk
- # and do not know if sed is capable of this...
+ tr=`mktemp /tmp/XXXXXX` ; then
current_replacement="$DNS1"
next_replacement="$DNS2"
search=
@@ -67,7 +65,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