aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/rc.sysinit5
1 files changed, 5 insertions, 0 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 149c895b..ea2322f9 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -17,11 +17,16 @@ fi
PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PATH
+HOSTNAME=`/bin/hostname`
+
# Read in config data.
if [ -f /etc/sysconfig/network ]; then
. /etc/sysconfig/network
else
NETWORKING=no
+fi
+
+if [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" ]; then
HOSTNAME=localhost
fi