I've been thinking about this same thing, and I thought that relatively static fallback list of environments plus an (persistant) index to tell you what you've tried so far might work. I was considering stealing a byte from the RTC CMOS to hold the state between reboots.
louie To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current" in the body of the message