mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
weston-init: add a native systemd unit file
Previously weston was started by systemd via a classic init script [YOCTO #5582] (From OE-Core rev: e67c7f0998a5a285bd079d2c956bd61457e75077) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
a1fa8d9ac5
commit
fccb12818a
@@ -1,17 +1,22 @@
|
|||||||
SUMMARY = "Startup script for the Weston Wayland compositor"
|
SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
|
||||||
LICENSE = "MIT"
|
LICENSE = "MIT"
|
||||||
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
|
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
|
||||||
|
|
||||||
SRC_URI = "file://init"
|
SRC_URI = "file://init \
|
||||||
|
file://weston.service"
|
||||||
|
|
||||||
S = "${WORKDIR}"
|
S = "${WORKDIR}"
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -d ${D}/${sysconfdir}/init.d
|
install -d ${D}/${sysconfdir}/init.d
|
||||||
install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
|
install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
|
||||||
|
|
||||||
|
install -d ${D}${systemd_system_unitdir}
|
||||||
|
install -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherit allarch update-rc.d distro_features_check
|
inherit allarch update-rc.d distro_features_check systemd
|
||||||
|
|
||||||
# rdepends on weston which depends on virtual/egl
|
# rdepends on weston which depends on virtual/egl
|
||||||
REQUIRED_DISTRO_FEATURES = "opengl"
|
REQUIRED_DISTRO_FEATURES = "opengl"
|
||||||
|
|
||||||
@@ -19,3 +24,5 @@ RDEPENDS_${PN} = "weston kbd"
|
|||||||
|
|
||||||
INITSCRIPT_NAME = "weston"
|
INITSCRIPT_NAME = "weston"
|
||||||
INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
|
INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
|
||||||
|
|
||||||
|
SYSTEMD_SERVICE_${PN} = "weston.service"
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Weston Wayland compositor startup
|
||||||
|
RequiresMountsFor=/run
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=root
|
||||||
|
EnvironmentFile=-/etc/default/weston
|
||||||
|
Environment="XDG_RUNTIME_DIR=/run/user/root"
|
||||||
|
ExecStartPre=/bin/mkdir -p /run/user/root
|
||||||
|
ExecStartPre=/bin/chmod 0700 /run/user/root
|
||||||
|
ExecStart=/usr/bin/openvt -v -e /usr/bin/weston -- $OPTARGS
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
Reference in New Issue
Block a user