20 lines
483 B
Plaintext
20 lines
483 B
Plaintext
|
description "Setup System Hostname"
|
||
|
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
||
|
version 1.0
|
||
|
emits none special
|
||
|
|
||
|
start on ( runlevel [S012345] and ( started udev ))
|
||
|
|
||
|
console none
|
||
|
script
|
||
|
echo "setting up hostname"
|
||
|
source /etc/init/functions
|
||
|
if [ -f /etc/sysconfig/nodename ]; then
|
||
|
/bin/hostname `cat /etc/sysconfig/nodename`
|
||
|
status_message "Hostname set to $HOSTNAME"
|
||
|
else
|
||
|
/bin/hostname "localhost"
|
||
|
status_message "Hostname set to $HOSTNAME"
|
||
|
fi
|
||
|
end script
|