# shellcheck shell=sh ( [ -r /etc/hostname ] && read -r HOSTNAME < /etc/hostname [ "${HOSTNAME}" ] && { msg "setting hostname to '${HOSTNAME}'" printf '%s' "${HOSTNAME}" > /proc/sys/kernel/hostname \ || error 'failed to set hostname' } ) &