From 7749dd16d46cb48d1791e4ca2ac9fea37d9ae515 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 21 Jan 2022 08:14:30 +0100 Subject: cut off domain --- hook/hostname | 1 + 1 file changed, 1 insertion(+) (limited to 'hook/hostname') diff --git a/hook/hostname b/hook/hostname index 0ef6f6f..4606362 100644 --- a/hook/hostname +++ b/hook/hostname @@ -11,6 +11,7 @@ run_latehook() { 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..." -- cgit v1.2.3-70-g09d2