aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-01-21 08:14:30 +0100
committerGravatar Christian Hesse <mail@eworm.de>2022-01-21 08:14:30 +0100
commit7749dd16d46cb48d1791e4ca2ac9fea37d9ae515 (patch)
tree3eaae7a481020a353c691f06cc5a9bee302b47b8
parentf297f46596b4ce221b03314edcd2fb06dcdc6f66 (diff)
downloadmkinitcpio-hostname-7749dd16d46cb48d1791e4ca2ac9fea37d9ae515.tar.gz
mkinitcpio-hostname-7749dd16d46cb48d1791e4ca2ac9fea37d9ae515.tar.zst
cut off domain
-rw-r--r--hook/hostname1
1 files changed, 1 insertions, 0 deletions
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..."