[Lunar-commits] r18860 - moonbase/trunk/net/net-tools/init.d
Auke Kok
sofar at lunar-linux.org
Fri Feb 24 16:09:28 UTC 2006
Author: sofar
Date: 2006-02-24 16:09:25 +0000 (Fri, 24 Feb 2006)
New Revision: 18860
Modified:
moonbase/trunk/net/net-tools/init.d/hostname
Log:
Actually I broke this - tsss
Modified: moonbase/trunk/net/net-tools/init.d/hostname
===================================================================
--- moonbase/trunk/net/net-tools/init.d/hostname 2006-02-24 12:52:04 UTC (rev 18859)
+++ moonbase/trunk/net/net-tools/init.d/hostname 2006-02-24 16:09:25 UTC (rev 18860)
@@ -1,20 +1,19 @@
#!/bin/sh
#
-# hostname: to set the system's hostname and domainname as a part of the
-# init process and to setup the loopback interface
+# hostname: set the system's host and domain name
#
case $1 in
start)
- if ! [ -e "/etc/hostname" ]; then
+ if [ ! -e "/etc/hostname" ]; then
HOSTNAME=localhost
else
HOSTNAME=$(cat /etc/hostname)
fi
- hostname -F /etc/hostname
+ hostname "$HOSTNAME"
echo "Hostname set to \"$HOSTNAME\""
- if ! [ -e "/etc/domainname" ]; then
+ if [ ! -e "/etc/domainname" ]; then
echo "Domainname not set"
else
domainname -F /etc/domainname
More information about the Lunar-commits
mailing list