forked from brl/citadel
set up systemd hook in initramfs
This commit is contained in:
parent
a23491b95d
commit
a124f6d9b0
@ -23,8 +23,12 @@ do_install() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
install -d ${D}${systemd_system_unitdir}
|
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 -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 -d ${D}${sysconfdir}
|
||||||
install -m 644 ${WORKDIR}/initrd-release ${D}${sysconfdir}
|
install -m 644 ${WORKDIR}/initrd-release ${D}${sysconfdir}
|
||||||
install -m 644 ${WORKDIR}/crypttab ${D}${sysconfdir}
|
install -m 644 ${WORKDIR}/crypttab ${D}${sysconfdir}
|
||||||
|
@ -4,5 +4,3 @@ Description=Watch for new entries in /dev/mapper
|
|||||||
[Path]
|
[Path]
|
||||||
PathChanged=/dev/mapper
|
PathChanged=/dev/mapper
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=initrd-root-fs.target
|
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Mount citadel rootfs
|
Description=Mount citadel rootfs
|
||||||
|
|
||||||
|
ConditionPathExists=/dev/mapper/citadel-rootfsA
|
||||||
|
ConditionPathExists=/dev/mapper/citadel-rootfsB
|
||||||
|
ConditionPathExists=/dev/mapper/citadel-storage
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=no
|
RemainAfterExit=yes
|
||||||
ExecStart=/bin/sh -c 'echo "hello world"'
|
ExecStart=/bin/sh -c 'echo "hello world"'
|
||||||
|
Loading…
Reference in New Issue
Block a user