1
0
forked from brl/citadel

add service for lvm activation since everything for early activation in latest LVM is broken

This commit is contained in:
Bruce Leidl 2019-01-15 12:27:17 -05:00
parent ea8d4314e7
commit 1b0ce58f32
3 changed files with 22 additions and 1 deletions

View File

@ -8,12 +8,12 @@ SRC_URI = "\
file://initrd-release \
file://crypttab \
file://11-dm.rules \
file://citadel-lvm-activate.service \
file://citadel-rootfs-mount.path \
file://citadel-rootfs-mount.service \
file://citadel-rootfs-setup.service \
file://citadel-install-rootfs-mount.service \
file://citadel-install-rootfs-setup.service \
file://citadel-image.conf \
file://99-grsec.conf \
"
@ -28,6 +28,7 @@ do_install() {
done
install -d ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/citadel-lvm-activate.service ${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-setup.service ${D}${systemd_system_unitdir}

View File

@ -0,0 +1,18 @@
[Unit]
Description=Activate LVM volumes
DefaultDependencies=no
AssertPathExists=/etc/initrd-release
# Don't run if running from installer or in live mode
ConditionKernelCommandLine=!citadel.install
ConditionKernelCommandLine=!citadel.live
Requires=cryptsetup.target
After=cryptsetup.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/vgchange -v -aay --sysinit

View File

@ -13,6 +13,8 @@ ConditionKernelCommandLine=root=/dev/mapper/rootfs
ConditionKernelCommandLine=!citadel.install
ConditionKernelCommandLine=!citadel.live
Requires=citadel-lvm-activate.service
[Path]
PathChanged=/dev/mapper