Since I could not find a WAN failover script for Linux to my likening, I wrote one myself. If you have any use for it: I put it on a Google code project.
WFS tests the availability of your primary WAN connection and switches to your secondary / backup connection when a failure is detected. When in failover mode, WFS continues to monitor the availability of the primary WAN connection and once it becomes available again, it switches back.
For more information and a download, please take a look at the project: