rackspace/openstack-guest-agents-unix — pull request #8 by sivel (2012-09-20 17:37:22+00:00)
Title: Better handling of static routes in debian/ubuntu

* Indent the up and down lines for static routes in the interfaces files to match the indentation of the rest of the interface stanza, not required, but better for readability
* Switch to post-up and pre-down instead of up and down for adding and removing routes, to prevent a possible race condition of adding or removing a route on an interface, when the interface is not ready
* append "|| true" to the end of the up and down commands. If the command was to return a non-zero exit code, interfaces could be left in an inconsistent state, unable to be managed by ifup/ifdown. This can happen if the route is missing when the down command runs to delete the route, or if the route exists when the up command runs to add the route. Appending "|| true" forces a 0 exit code to be returned. Errors from the route command are still sent to stderr, but do not cause interface management operations to fail non-gracefully.