Make the hostname_command work when there is no ec2metadata.