Ever had to change the IP on a server that's without any local supervision, behind who knows how many firewalls, in another country, with only SSH accesss sticking out of it? Wouldn't it be nice if there was a function similar to the Displays preference pane, in which, if the settings turn out to be incorrect, it automatically reverts to the previous working setup? Well, here's one.
Before any critical conf change, I just re-define the current config into an at command:
<code> $ sudo at now + 15 minute $ changeip - newip oldip newhost oldhost $ networksetup -setmanual networkport oldip oldnetmask oldrouter $ Ctrl -D </code>
Then, make your changes. If all does work out, don't forget to disable the safety harness:
<code> $ sudo at -l $ sudo at -r jobnumber </code>
I used an IP change as an example here, but I'm sure you can think of other scenarios with potentially tragic consequences.