aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1998-04-02 21:41:09 +0000
committerErik Troan <ewt@redhat.com>1998-04-02 21:41:09 +0000
commitfa5a2db2ce9ad6ef64d25d5e7370f94dbedffda1 (patch)
tree73ec8da897ade1206f41c4faa89cc81535543f0c
parentfbe4f2fdfe00ebb3a09449b317c4e8b533737f8e (diff)
downloadinitscripts-fa5a2db2ce9ad6ef64d25d5e7370f94dbedffda1.tar
initscripts-fa5a2db2ce9ad6ef64d25d5e7370f94dbedffda1.tar.gz
initscripts-fa5a2db2ce9ad6ef64d25d5e7370f94dbedffda1.tar.bz2
initscripts-fa5a2db2ce9ad6ef64d25d5e7370f94dbedffda1.tar.xz
initscripts-fa5a2db2ce9ad6ef64d25d5e7370f94dbedffda1.zip
1) set domain variable if none is set in /etc/sysconfig/networkr3-51
2) add search path to /etc/resolv.conf if none is present
-rwxr-xr-xrc.d/rc.sysinit8
1 files changed, 8 insertions, 0 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index cf881faa..cef3a542 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -25,6 +25,10 @@ swapon -a
hostname ${HOSTNAME}
echo hostname: `hostname`
+if [ -n ${DOMAIN} ]; then
+ DOMAIN=`echo $HOSTNAME | sed 's/^[^\.]*\.//'`
+fi
+
# Set the NIS domain name
if [ -n "$NISDOMAIN" ]; then
domainname $NISDOMAIN
@@ -157,6 +161,10 @@ if [ -x /sbin/kerneld -a -n "$USEMODULES" ]; then
KERNELD=yes
fi
+if ! grep search /etc/resolv.conf ; then
+ echo "search $DOMAIN" >> /etc/resolv.conf
+fi
+
# Check filesystems
if [ ! -f /fastboot ]; then
echo "Checking filesystems."