Rewrite to use a single fact instead of an external script. Also simplified the exec part and added some Solaris support.