Update to set a hostname if not found in the env.

/bin/dash doesn't seem to populate $HOSTNAME.