On Sun, 1 Feb 2004 14:47, C Hamel wrote: #!/bin/bash
# # Script to check if ADSL is disconnected & try reconnecting # result=$(cinternet -i dsl0 -s | grep disconnect) Checks the status of device dsl0 for the word 'disconnect' and stores the result in a variable called 'result' if [ -n "$result" ] Test to see if the value is not NULL then OK the interface is down cinternet -i dsl0 -A Start the interface. sleep 10 else The interface is up - Just exit exit 0 fi ____________________ EOF ______________________
Many thanks for the script! I take it that the dsl0 represents the device. I understand some of the script, but I could use a little more commenting, since I am not all that script-savvy, yet --'yet' being key word, I hope. I haven't done any programming in roughly 20 years. :-\
Thanks!! ...CH
I suggest you look at the man page for cinternet for further details on it's command options. -- Regards, Graham Smith ---------------------------------------------------------