![kueller](/assets/img/avatar_default.png)
blockt den stop... git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_cdboot@5717 504e572c-2e33-0410-9681-be2bf7408885
19 lines
524 B
Plaintext
19 lines
524 B
Plaintext
description "Setup System Hostname"
|
|
author "Harald Kueller <harald.kueller@compuextreme.de>"
|
|
version 1.0
|
|
emits none special
|
|
|
|
start on ( runlevel [012345] and ( started udev ))
|
|
|
|
console none
|
|
script
|
|
if ip addr list dev eth0|grep -q inet; then
|
|
IP=`ifconfig eth0|grep inet|awk '{print $2}'|cut -d ":" -f 2`
|
|
echo "$IP ViitorLinux_install" >>/etc/hosts
|
|
else
|
|
sed -e "s/127\.0\.0\.1.*$/127.0.0.1 localhost ViitorLinux_install/" /etc/hosts >/tmp/hosts
|
|
mv /tmp/hosts /var/etc/hosts
|
|
fi
|
|
hostname ViitorInstall
|
|
end script
|