This is based off of another script, and gathers hostid information for use in a customized Inventory / Server Details report.
It uses set_prop.ksh to set or update the HOSTID custom property from the 'hostid' command on Solaris systems. It also uses a watchdog script to kill itself off if it's been running for more than two minutes (script should complete in < 15 seconds).
The default location for these scripts in the environment I'm currently in is /usr/nsh/custom/scripts/ . Feel free to change the paths in the scripts for your environment.