[Gllug] Question

Ashley Evans k0210244 at kingston.ac.uk
Mon May 19 13:07:25 UTC 2003


> Another useful tip for working on kit is to kick off a reboot some time in
> the future (3 minutes after you plan to finish making changes) so that when
> you do lock yourself out you should only have to wait a few minutes for
> your kit to reboot and come back online. Of course this is only useful on
> kit that will allow you to cancel an already running shutdown...

Or you you use '&&'s, they only execute the next statement if the first exits 
successfully.

ifconfig eth0 192.168.0.102 && sleep 100 && ifconfig 192.168.0.101 (orig ip)

if things go wrong sleep exits successfully and the final command is executed. 
If things work out ok just re-ssh to the new ip and kill sleep, which then 
exits with an error code and the final ifconfig won't run.

hth

Ashley.






-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list