X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=dracut%2F90zfs%2Fmodule-setup.sh.in;h=c01915e82eee71667b40e358bb106794edbaab60;hb=e8753fb4f03aaa371028aaec145449f2610229cf;hp=33f78e51cde7a2e7ec9d1470b0f4ad0be50b5a69;hpb=6ebd8ef103c3ed4739987f36d77874f6953af89f;p=zfs.git diff --git a/dracut/90zfs/module-setup.sh.in b/dracut/90zfs/module-setup.sh.in index 33f78e5..c01915e 100755 --- a/dracut/90zfs/module-setup.sh.in +++ b/dracut/90zfs/module-setup.sh.in @@ -33,7 +33,6 @@ install() { inst_rules @udevruledir@/60-zvol.rules inst @sysconfdir@/zfs/zdev.conf inst @sysconfdir@/zfs/zpool.cache - inst @sysconfdir@/hostid dracut_install @sbindir@/zfs dracut_install @sbindir@/zpool dracut_install @bindir@/zpool_layout @@ -43,4 +42,14 @@ install() { dracut_install hostid inst_hook cmdline 95 "$moddir/parse-zfs.sh" inst_hook mount 98 "$moddir/mount-zfs.sh" + + # Synchronize initramfs and system hostid + TMP=`mktemp` + AA=`hostid | cut -b 1,2` + BB=`hostid | cut -b 3,4` + CC=`hostid | cut -b 5,6` + DD=`hostid | cut -b 7,8` + printf "\x$DD\x$CC\x$BB\x$AA" >$TMP + inst_simple "$TMP" /etc/hostid + rm "$TMP" }