Is there a way to reliably detect whether or not a machine is multi-homed? I'd like to be able to write a script that will return a true or false regarding that information.
You can approximate the definition of a multihomed machine as one having two default routes. A more precise definition would require determining how independent the routes are, which does seem daunting.
(The Solaris calls may require tweaking.)