recipe to add systemd service to start user-rootfs container
This commit is contained in:
parent
3fff10ccb3
commit
7302050e6d
@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
DESCRIPTION = ""
|
||||||
|
HOMEPAGE = ""
|
||||||
|
LICENSE = ""
|
||||||
|
SECTION = ""
|
||||||
|
DEPENDS = ""
|
||||||
|
|
||||||
|
SRC_URI = "file://default-user-rootfs.service"
|
||||||
|
|
||||||
|
S = "${WORKDIR}"
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
install -d ${D}${sysconfdir}/systemd/system
|
||||||
|
install -m 644 ${WORKDIR}/default-user-rootfs.service ${D}${sysconfdir}/systemd/system
|
||||||
|
}
|
||||||
|
|
||||||
|
pkt_postinst_${PN}() {
|
||||||
|
systemctl --root=$D enable default-user-rootfs
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Default User Image
|
||||||
|
ConditionPathExists=/storage/machines/default-user-rootfs
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --directory=/storage/machines/default-user-rootfs
|
||||||
|
KillMode=mixed
|
||||||
|
Type=notify
|
||||||
|
RestartForceExitStatus=133
|
||||||
|
SuccessExitStatus=133
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -74,4 +74,5 @@ RDEPENDS_${PN} = "\
|
|||||||
cryptsetup \
|
cryptsetup \
|
||||||
e2fsprogs \
|
e2fsprogs \
|
||||||
dosfstools \
|
dosfstools \
|
||||||
|
default-user-rootfs \
|
||||||
"
|
"
|
||||||
|
Loading…
Reference in New Issue
Block a user