summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-07-26 13:19:11 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2011-07-26 13:53:32 +0200
commit4ad7ec43564fd7ab9c5d50dfcccd4a59308dbcb1 (patch)
tree77ab21101e16f969c6eee7142d068d51ad26fbc9 /meta-oe/recipes-graphics
parent3eb8da77f58396eb720c2cc8824ce54a769b3ff7 (diff)
downloadmeta-openembedded-4ad7ec43564fd7ab9c5d50dfcccd4a59308dbcb1.tar.gz
xserver-nodm-init: add optional systemd support
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-graphics')
-rw-r--r--meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/xserver-nodm.service8
-rw-r--r--meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb28
2 files changed, 30 insertions, 6 deletions
diff --git a/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/xserver-nodm.service b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/xserver-nodm.service
new file mode 100644
index 000000000..b781c7d3c
--- /dev/null
+++ b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/xserver-nodm.service
@@ -0,0 +1,8 @@
1[Unit]
2Description=Xserver startup with a display manager
3
4[Service]
5ExecStart=/usr/bin/xinit /etc/X11/Xsession -- /usr/bin/Xorg
6
7[Install]
8WantedBy=multi-user.target
diff --git a/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb
index de378e606..d4a6b972f 100644
--- a/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb
+++ b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb
@@ -2,11 +2,11 @@ DESCRIPTION = "Simple Xserver Init Script (no dm)"
2LICENSE = "GPLv2" 2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" 3LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
4SECTION = "x11" 4SECTION = "x11"
5RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit" 5
6DEFAULT_PREFERENCE = "-1" 6PR = "r9"
7PR = "r5"
8 7
9SRC_URI = "file://xserver-nodm \ 8SRC_URI = "file://xserver-nodm \
9 file://xserver-nodm.service \
10 file://gplv2-license.patch \ 10 file://gplv2-license.patch \
11" 11"
12S = ${WORKDIR} 12S = ${WORKDIR}
@@ -14,13 +14,29 @@ S = ${WORKDIR}
14inherit allarch 14inherit allarch
15 15
16do_install() { 16do_install() {
17 install -d ${D}/etc 17 install -d ${D}${sysconfdir}/init.d
18 install -d ${D}/etc/init.d 18 install xserver-nodm ${D}${sysconfdir}/init.d
19 install xserver-nodm ${D}/etc/init.d 19
20 install -d ${D}${base_libdir}/systemd/system
21 install -m 0644 xserver-nodm.service ${D}${base_libdir}/systemd/system/
20} 22}
21 23
24RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit"
25FILES_${PN} += "${base_libdir}/systemd/system/"
26
22inherit update-rc.d 27inherit update-rc.d
23 28
24INITSCRIPT_NAME = "xserver-nodm" 29INITSCRIPT_NAME = "xserver-nodm"
25INITSCRIPT_PARAMS = "start 01 5 2 . stop 01 0 1 6 ." 30INITSCRIPT_PARAMS = "start 01 5 2 . stop 01 0 1 6 ."
26INITSCRIPT_PARAMS_shr = "start 90 5 2 . stop 90 0 1 6 ." 31INITSCRIPT_PARAMS_shr = "start 90 5 2 . stop 90 0 1 6 ."
32
33pkg_postinst_${PN}_append () {
34 # can't do this offline
35 if [ "x$D" != "x" ]; then
36 exit 1
37 fi
38
39 if [ -e /bin/systemctl ] ; then
40 systemctl enable xserver-nodm.service
41 fi
42}