aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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."