"bounce" a nic in one command?

Vram lamsokvr at xprt.net
Wed Dec 14 04:44:25 UTC 2005


On Wed, 2005-12-14 at 12:21 +0800, Senectus . wrote:
> I've just altered the IP settings for a NIC in a remote PC (from DHCP
> to Static), I want to do an ifdown eth0 then an ifup eth0 but If I do
> an ifdown I'll immediately lose my connection and not be able to get
> back to it remotely.
> So is there a was to automate the ifup eth0 ? a one line command maybe?
> --



Yes try 

at..

Do a man on at...

It is for running commands only once..

I have NEVER used it but, it should do the job for you.

The command <someone yell if this is wrong>

As root

# at <some time let say it's 9 PM now> 10PM  < so in one hour..Check
time on remote machine>
at> ifup eth0
at> ctrl-d <control -d>

Then it will list some job number

You can check the que

# atq

<your job should be lister here>





This goes on the REMOTE pc....


HTH


Vram









> Ubuntu Breezy 5.10
>   I will write on a huge cement block "By accepting this brick through
> your window, you accept it as it is and agree to my disclaimer of all
> warranties, express or implied, as well as disclaimers of all
> liability, direct, indirect, consequential, or incidental, that may
> arise from the installation of this brick into your building." - PJ
> Groklaw
> www.modmeup.net
> 





More information about the ubuntu-users mailing list