eth0 bei dhcclient kill funktioniert natuerlich nicht - korrekt mit variable gesetzt.

ifconfig $DEV 0.0.0.0 down nimmt das device auch wirklich runter



git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_sysvinit@5229 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
kueller 2010-01-26 15:48:26 +00:00
parent 7f4fc5a407
commit 6bc850963e

View File

@ -36,7 +36,8 @@ if [ ! "$DEV" ]; then
exit 10
fi
if [ -f /etc/sysconfig/net/${DEV}.dhcp ]; then
kill `ps -ef|grep dhclient|grep eth0|awk '{print $2}'`
kill `ps -ef|grep dhclient|grep ${DEV}|awk '{print $2}'`
ifconfig $DEV 0.0.0.0 down
elif [ -f /etc/sysconfig/net/hostname.${DEV} ]; then
HOST=`cat /etc/sysconfig/net/hostname.${DEV}|awk '{print $1}'`
IP=`grep $HOST /etc/hosts|awk '{print $1}'`