set up systemd hook in initramfs

This commit is contained in:
Bruce Leidl 2018-03-27 21:48:58 -04:00
parent a23491b95d
commit a124f6d9b0
3 changed files with 10 additions and 4 deletions

View File

@ -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}

View File

@ -4,5 +4,3 @@ Description=Watch for new entries in /dev/mapper
[Path]
PathChanged=/dev/mapper
[Install]
WantedBy=initrd-root-fs.target

View File

@ -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"'