aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-08-07 19:45:23 +0000
committerBill Nottingham <notting@redhat.com>2000-08-07 19:45:23 +0000
commit904691cc2039ef45e564785ea0de80c81bfeb89c (patch)
treecfc6961488668f2532b53dd998019124a6d1ae06 /rc.d
parentb9c2ebecffd751ff0cdeed1ad6eca0889a8f83d2 (diff)
downloadinitscripts-904691cc2039ef45e564785ea0de80c81bfeb89c.tar
initscripts-904691cc2039ef45e564785ea0de80c81bfeb89c.tar.gz
initscripts-904691cc2039ef45e564785ea0de80c81bfeb89c.tar.bz2
initscripts-904691cc2039ef45e564785ea0de80c81bfeb89c.tar.xz
initscripts-904691cc2039ef45e564785ea0de80c81bfeb89c.zip
don't set hostname if it's already set (NFS root)
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