Added a path watching unit

This commit is contained in:
Bruce Leidl 2018-03-27 20:40:02 -04:00
parent 47f2bd106e
commit 1bc1c0e5f7
3 changed files with 17 additions and 3 deletions

View File

@ -4,7 +4,13 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384
SECTION = ""
DEPENDS = ""
SRC_URI = "file://initrd-release file://crypttab file://11-dm.rules file://citadel-rootfs-mount.service"
SRC_URI = "\
file://initrd-release \
file://crypttab \
file://11-dm.rules \
file://citadel-rootfs-mount.path \
file://citadel-rootfs-mount.service \
"
S = "${WORKDIR}"
@ -17,6 +23,7 @@ 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.service ${D}${systemd_system_unitdir}
install -d ${D}${sysconfdir}
install -m 644 ${WORKDIR}/initrd-release ${D}${sysconfdir}

View File

@ -0,0 +1,8 @@
[Unit]
Description=Watch for new entries in /dev/mapper
[Path]
PathChanged=/dev/mapper
[Install]
WantedBy=initrd-root-fs.target

View File

@ -3,6 +3,5 @@ Description=Mount citadel rootfs
[Service]
Type=oneshot
RemainAfterExit=yes
RemainAfterExit=no
ExecStart=/bin/sh -c 'echo "hello world"'