mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-02 13:59:59 +00:00
xserver-nodm-init: add optional systemd support
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Xserver startup with a display manager
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/xinit /etc/X11/Xsession -- /usr/bin/Xorg
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -2,11 +2,11 @@ DESCRIPTION = "Simple Xserver Init Script (no dm)"
|
|||||||
LICENSE = "GPLv2"
|
LICENSE = "GPLv2"
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
|
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
|
||||||
SECTION = "x11"
|
SECTION = "x11"
|
||||||
RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit"
|
|
||||||
DEFAULT_PREFERENCE = "-1"
|
PR = "r9"
|
||||||
PR = "r5"
|
|
||||||
|
|
||||||
SRC_URI = "file://xserver-nodm \
|
SRC_URI = "file://xserver-nodm \
|
||||||
|
file://xserver-nodm.service \
|
||||||
file://gplv2-license.patch \
|
file://gplv2-license.patch \
|
||||||
"
|
"
|
||||||
S = ${WORKDIR}
|
S = ${WORKDIR}
|
||||||
@@ -14,13 +14,29 @@ S = ${WORKDIR}
|
|||||||
inherit allarch
|
inherit allarch
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -d ${D}/etc
|
install -d ${D}${sysconfdir}/init.d
|
||||||
install -d ${D}/etc/init.d
|
install xserver-nodm ${D}${sysconfdir}/init.d
|
||||||
install xserver-nodm ${D}/etc/init.d
|
|
||||||
|
install -d ${D}${base_libdir}/systemd/system
|
||||||
|
install -m 0644 xserver-nodm.service ${D}${base_libdir}/systemd/system/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit"
|
||||||
|
FILES_${PN} += "${base_libdir}/systemd/system/"
|
||||||
|
|
||||||
inherit update-rc.d
|
inherit update-rc.d
|
||||||
|
|
||||||
INITSCRIPT_NAME = "xserver-nodm"
|
INITSCRIPT_NAME = "xserver-nodm"
|
||||||
INITSCRIPT_PARAMS = "start 01 5 2 . stop 01 0 1 6 ."
|
INITSCRIPT_PARAMS = "start 01 5 2 . stop 01 0 1 6 ."
|
||||||
INITSCRIPT_PARAMS_shr = "start 90 5 2 . stop 90 0 1 6 ."
|
INITSCRIPT_PARAMS_shr = "start 90 5 2 . stop 90 0 1 6 ."
|
||||||
|
|
||||||
|
pkg_postinst_${PN}_append () {
|
||||||
|
# can't do this offline
|
||||||
|
if [ "x$D" != "x" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e /bin/systemctl ] ; then
|
||||||
|
systemctl enable xserver-nodm.service
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user