This script is to persistently nag the router to release DHCP information. The script must be run as root. This is for slow routers or one which is overloaded with clients. Do not use for normal routers. Otherwise it could be misconstrued as a security threat.
persistent bind connection DHCP script
-------------------------
# script to persistently nag the router to release DHCP information : must be run as root
# persistent bind connection DHCP script
b=`expr 1`
while [ $b -lt 2 ]
do
echo "Starting new DHCPREQUEST .... after 5 secs ... "
sleep 5
/etc/init.d/networking restart
echo -e "\n xxxxxxxxxxxxxxxxxxxx \n `tail -n 20 /var/log/syslog` \n xxxxxxxxxxxxxxxxxxxx \n"
if [ "` tail -n 20 /var/log/syslog | grep "DHCPOFFER" | grep "of 192"`" ] ;
then
echo -e "\nExiting inf. loop .............\n"
b=`expr 3`
fi
done
Comments