From 3c38f904f831f02d5f5c28f431ca86d9877697f1 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 18 Apr 2011 14:16:08 -0400 Subject: Support overriding hostname via /etc/hostname. --- rc.d/rc.sysinit | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rc.d') diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 6067ea88..561e99e8 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -12,6 +12,9 @@ set -m if [ -f /etc/sysconfig/network ]; then . /etc/sysconfig/network fi +if [ -r /etc/hostname ]; then + HOSTNAME=$(cat /etc/hostname) +fi if [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" ]; then HOSTNAME=localhost fi -- cgit v1.2.1