X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=dracut%2F90zfs%2Fmodule-setup.sh.in;h=6eb6843819aa43e0202ff7e0fabf657815b77ea8;hb=refs%2Fheads%2Frertzinger%2Ffeature-zpool-get--p;hp=33f78e51cde7a2e7ec9d1470b0f4ad0be50b5a69;hpb=f0102d6e75d51b8d92624ba054a3fa54c807fb7f;p=zfs.git diff --git a/dracut/90zfs/module-setup.sh.in b/dracut/90zfs/module-setup.sh.in index 33f78e5..6eb6843 100755 --- a/dracut/90zfs/module-setup.sh.in +++ b/dracut/90zfs/module-setup.sh.in @@ -29,18 +29,28 @@ installkernel() { install() { inst_rules @udevruledir@/90-zfs.rules - inst_rules @udevruledir@/60-zpool.rules + inst_rules @udevruledir@/69-vdev.rules 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 - dracut_install @udevdir@/zpool_id + dracut_install @udevdir@/vdev_id dracut_install @udevdir@/zvol_id dracut_install mount.zfs dracut_install hostid inst_hook cmdline 95 "$moddir/parse-zfs.sh" inst_hook mount 98 "$moddir/mount-zfs.sh" + + if [ -e @sysconfdir@/zfs/zpool.cache ]; then + inst @sysconfdir@/zfs/zpool.cache + fi + + # 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" }