On Monday 21 November 2005 15:57, Rony Bill wrote:
Hello Arun,
Where is the original mail with the script? I will get triband installed any day whenever mtnl is in a mood to deliver. I placed my order 13 days ago. :D
Regards,
Rony.
Heres the script:
<script> #!/usr/bin/expect -f ########################################################################### # Name: dsl502t-reboot (install in /usr/local/bin, owner:group root.root # and file perms 700) # Purpose: Reboot the DLink 502T ADSL modem/router # Author: Arun Khan (knura at yahoo dot com) # Warranty: None - if it breaks your system, you get to keep all the # pieces :) # Usage: Create a file with the following lines and install it in # /etc/cron.d - do not forget to remove "#" for the 2 entries ########################################################################### # reboot MTNL ADSL modem #1 0 * * * root /usr/local/bin/dsl502t-reboot #59 7 * * * root /usr/local/bin/dsl502t-reboot ###########################################################################
# change the ip number if different spawn telnet 192.168.1.1 expect "ogin:" { send "root\r" } # change the password if different expect "ssword:" { send "admin\r" } expect "#" { send "reboot\r" } expect eof </script>