diff options
Diffstat (limited to 'hook/hostname')
-rw-r--r-- | hook/hostname | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hook/hostname b/hook/hostname index 0ef6f6f..585229a 100644 --- a/hook/hostname +++ b/hook/hostname @@ -3,14 +3,13 @@ run_latehook() { local newroot="/new_root/" - /usr/bin/systemd-machine-id-setup --root="${newroot}" - if [[ ! -s "${newroot}/etc/hostprefix" ]]; then cp "${newroot}/etc/hostname" "${newroot}/etc/hostprefix" fi hostprefix="$(cat "${newroot}/etc/hostprefix")" if [[ -n "${hostname}" ]]; then + hostname="${hostname%%.*}" msg ":: Setting hostname for main system to '${hostprefix}-${hostname}'..." elif [[ -e /sys/class/dmi/id/product_uuid ]]; then msg ":: Setting hostname from product uuid..." |