I'm writing a script to automatically reset my connection when it's lost (while using a bittorrent client, apparently a common problem people have). I usually lose the connection after a few hours of use, and reseting it manually from the GUI (gnome) works well, so I thought I should automate this
however, using the shell I can disconnect, but not reconnect. I've read these various threads:
and got out of it that I should use (as sudo):
to disconnect and
ifdown eth0 # or
ifconfig eth0 down
ifup eth0 # or
ifconfig eth0 up
in my case, neither ifdown/ifup work, and only "ifconfig eth0 down" does ("up" doesn't). when I restart networking in general using
I get "networking stop/waiting"
"ifconfig" confirms that I use "eth0" and as I said earlier, manual resetting (connection quick icon + click on "Auto eth0") works fine, so I find it a bit odd that command line does't work
Anyone as got any idea what could be wrong?