make sure to generate /etc/hostname.
remove unnecessary directory check.
define hostname as readonly.