aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-02-17 23:13:34 +0000
committerBill Nottingham <notting@redhat.com>2000-02-17 23:13:34 +0000
commitf95875c5b998589f77fe675a8c88808349c88705 (patch)
treef7b2497ba069078f750227723453d10a2085d3af /sysconfig
parent1cbf885e45f036a941d91d81825eb2430dc4c9bd (diff)
downloadinitscripts-f95875c5b998589f77fe675a8c88808349c88705.tar
initscripts-f95875c5b998589f77fe675a8c88808349c88705.tar.gz
initscripts-f95875c5b998589f77fe675a8c88808349c88705.tar.bz2
initscripts-f95875c5b998589f77fe675a8c88808349c88705.tar.xz
initscripts-f95875c5b998589f77fe675a8c88808349c88705.zip
support for isdn stuff
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifup-post19
1 files changed, 18 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post
index 6bce2aa1..54fc0786 100755
--- a/sysconfig/network-scripts/ifup-post
+++ b/sysconfig/network-scripts/ifup-post
@@ -28,12 +28,16 @@ if [ "$2" = "boot" -a -n "$NEEDHOSTNAME" -a "${DEVICE}" != lo -a "${DEVICETYPE}"
eval `/bin/ipcalc --silent --hostname ${IPADDR}` && set_hostname $HOSTNAME
fi
-if [ "$PEERDNS" != no -a -n "$DNS1" ] && ! grep -q "^nameserver $DNS1" /etc/resolv.conf &&
+if [ "$PEERDNS" !="no" -o "$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...
current_replacement="$DNS1"
next_replacement="$DNS2"
+ search=
(cat /etc/resolv.conf ; echo EOF ; echo EOF) | while read answer ; do
case $answer in
nameserver*|EOF)
@@ -51,14 +55,27 @@ if [ "$PEERDNS" != no -a -n "$DNS1" ] && ! grep -q "^nameserver $DNS1" /etc/reso
fi
fi
;;
+ domain*|search*)
+ if [ -n "$DOMAIN" ]; then
+ echo "$answer" | while read key value ; do
+ search="$search $value"
+ done
+ else
+ echo "$answer" >> $tr
+ fi
*)
echo "$answer" >> $tr
;;
esac
+ if [ -n "$DOMAIN" ]; then
+ echo "search $DOMAIN $search" >> $tr
+ fi
done
+
# maintain permissions
cat $tr > /etc/resolv.conf
rm -f $tr
+ fi
fi
# Notify programs that have requested notification