PDA

View Full Version : restart eth0 automatically



jt72
10-16-2004, 03:23 PM
When not transferring shows to or from my Tivo I would like to be able to disconnect the network cable, so that it is not strung across the living room.

Is there a way to check the eth0 connection (say every 10 minutes via ping) and then try to re-start it if there is no connection? That way I would not have to restart the tivo every time I want to transfer stuff. And when I would plug the network cable back in it would automatically re-connect within 10 minutes, without having to restart the Tivo.

With the new CacheCard NIC installed, rebooting takes nearly 10 minutes by itself.

captain_video
10-17-2004, 08:35 PM
You shouldn't have to restart the Tivo if you unplug the ethernet cable. I disconnect the cables on both my S1 and S2 DTivos all the time and there's no need to restart or reboot them to reestablish a connection. If for some reason you are not able to get a connection going again there's a simple command line that you can use with bash using a serial cable to get it going again. Unfortunately, I can't remember the exact command but it's something like:

eth0 down
eth0 up

cojonesdetoro
10-17-2004, 09:33 PM
You might want to set a fixed IP instead of using DHCP. Search for "fixed" and DHCP. There are different ways to do it. On my S1, I do it this way:

comment out the 'dhclient' line in /etc/rc.d/rc.net

put these line in /etc/rc.d/rc.sysinit


/sbin/ifconfig eth0 192.168.0.9 netmask 255.255.255.0 (or whatever IP+mask you like)

/sbin/route add default gw 192.168.0.1 (use the IP of your router to the Internet)

note: don't include stuff in parens above.