Quote:
|
At work on Windoze. Can't play right now
|
That's why I have a tiny but fully functional Asus eee 701 - to "play" with at work. "Lunch 5-mins" and all that.
It is now running Kubuntu 8.04 perfectly, though a few tweaks were necessary. Goodbye Xandros
I just tried my suggestion for a solution for you:
I put this script into
/etc/network/if-up.d/testing
Code:
#!/bin/bash
if [ "$IFACE" = eth1 ]; then
echo eth1 was brought up at `date` >> /home/tred/eth_log
fi
And made it executable.
As root, I brought down my interface, then up again:
Code:
ifdown eth1
ifup eth1
The testing logfile appeared:
Code:
tred@vaio:~$ cat /home/tred/eth_log
eth1 was brought up at Wed Aug 13 21:40:36 BST 2008
And the resulting logfile is owned by root, so the script was run as root.
Therefore I would expect that you can run any arbitrary commands from such a script and they will be run after the interface is brought up.
Obviously, you'll need to change
eth1 for whatever
your relevant interface is called.
How much error-checking and reporting, you care to put into such a script is up to you (As you see, I have NONE, but it was just a test.)
Let us know how you get on.