Resolve bashism: use HOSTNM to specify the hostname executable, not HOSTNAME which is a bash variable