diff --git a/meta-citadel/recipes-initrd/citadel-initramfs/citadel-initramfs.bb b/meta-citadel/recipes-initrd/citadel-initramfs/citadel-initramfs.bb index 29345e9..c242400 100644 --- a/meta-citadel/recipes-initrd/citadel-initramfs/citadel-initramfs.bb +++ b/meta-citadel/recipes-initrd/citadel-initramfs/citadel-initramfs.bb @@ -23,8 +23,12 @@ do_install() { done install -d ${D}${systemd_system_unitdir} - #install -m 644 ${WORKDIR}/citadel-rootfs-mount.path ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/citadel-rootfs-mount.path ${D}${systemd_system_unitdir} install -m 644 ${WORKDIR}/citadel-rootfs-mount.service ${D}${systemd_system_unitdir} + + install -d ${D}${systemd_system_unitdir}/sysinit.target.wants + ln -s ../citadel-rootfs-mount.path ${D}${systemd_system_unitdir}/sysinit.target.wants/citadel-rootfs-mount.path + install -d ${D}${sysconfdir} install -m 644 ${WORKDIR}/initrd-release ${D}${sysconfdir} install -m 644 ${WORKDIR}/crypttab ${D}${sysconfdir} diff --git a/meta-citadel/recipes-initrd/citadel-initramfs/files/citadel-rootfs-mount.path b/meta-citadel/recipes-initrd/citadel-initramfs/files/citadel-rootfs-mount.path index 0975326..85d60d4 100644 --- a/meta-citadel/recipes-initrd/citadel-initramfs/files/citadel-rootfs-mount.path +++ b/meta-citadel/recipes-initrd/citadel-initramfs/files/citadel-rootfs-mount.path @@ -4,5 +4,3 @@ Description=Watch for new entries in /dev/mapper [Path] PathChanged=/dev/mapper -[Install] -WantedBy=initrd-root-fs.target diff --git a/meta-citadel/recipes-initrd/citadel-initramfs/files/citadel-rootfs-mount.service b/meta-citadel/recipes-initrd/citadel-initramfs/files/citadel-rootfs-mount.service index aa62747..fe91c27 100644 --- a/meta-citadel/recipes-initrd/citadel-initramfs/files/citadel-rootfs-mount.service +++ b/meta-citadel/recipes-initrd/citadel-initramfs/files/citadel-rootfs-mount.service @@ -1,7 +1,11 @@ [Unit] Description=Mount citadel rootfs +ConditionPathExists=/dev/mapper/citadel-rootfsA +ConditionPathExists=/dev/mapper/citadel-rootfsB +ConditionPathExists=/dev/mapper/citadel-storage + [Service] Type=oneshot -RemainAfterExit=no +RemainAfterExit=yes ExecStart=/bin/sh -c 'echo "hello world"'