3e7818194e
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_cdboot@4353 504e572c-2e33-0410-9681-be2bf7408885
29 lines
540 B
Bash
Executable File
29 lines
540 B
Bash
Executable File
#!/bin/bash
|
|
|
|
source /etc/init.d/functions
|
|
|
|
case $1 in
|
|
start)
|
|
echo -n "Setting cdrom hostname in /etc/hosts"
|
|
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
|
|
evaluate_retval
|
|
;;
|
|
stop)
|
|
exit
|
|
;;
|
|
restart)
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
*)
|
|
echo "Usage: $0 start|stop"
|
|
;;
|
|
esac
|