aboutsummaryrefslogtreecommitdiffstats
path: root/hook/hostname
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-09-01 17:17:33 +0200
committerGravatar Christian Hesse <mail@eworm.de>2014-09-01 17:17:33 +0200
commit375a632d83192f0fcd0a8c7a8b9b9ddc44b0a15e (patch)
treeb89f527924e7adec0a876c887af7f9d2053fb420 /hook/hostname
parentd508f0e4bb80883de30fb4f171950032f4c5f9d8 (diff)
downloadmkinitcpio-hostname-375a632d83192f0fcd0a8c7a8b9b9ddc44b0a15e.tar.gz
mkinitcpio-hostname-375a632d83192f0fcd0a8c7a8b9b9ddc44b0a15e.tar.zst
set /etc/machine-id
Diffstat (limited to 'hook/hostname')
-rw-r--r--hook/hostname3
1 files changed, 3 insertions, 0 deletions
diff --git a/hook/hostname b/hook/hostname
index a612fef..07c8be6 100644
--- a/hook/hostname
+++ b/hook/hostname
@@ -2,6 +2,9 @@
run_latehook() {
local newroot="/new_root/"
+
+ /usr/bin/systemd-machine-id-setup --root="${newroot}"
+
if [[ -n "${hostname}" ]]; then
msg ":: Setting hostname for main system to '${hostname}'..."
elif [[ -e /sys/class/dmi/id/product_uuid ]]; then