diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2011-07-26 13:19:11 +0200 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-07-26 13:53:32 +0200 |
commit | 4ad7ec43564fd7ab9c5d50dfcccd4a59308dbcb1 (patch) | |
tree | 77ab21101e16f969c6eee7142d068d51ad26fbc9 /meta-oe/recipes-graphics | |
parent | 3eb8da77f58396eb720c2cc8824ce54a769b3ff7 (diff) | |
download | meta-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.service | 8 | ||||
-rw-r--r-- | meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb | 28 |
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] | ||
2 | Description=Xserver startup with a display manager | ||
3 | |||
4 | [Service] | ||
5 | ExecStart=/usr/bin/xinit /etc/X11/Xsession -- /usr/bin/Xorg | ||
6 | |||
7 | [Install] | ||
8 | WantedBy=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)" | |||
2 | LICENSE = "GPLv2" | 2 | LICENSE = "GPLv2" |
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
4 | SECTION = "x11" | 4 | SECTION = "x11" |
5 | RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit" | 5 | |
6 | DEFAULT_PREFERENCE = "-1" | 6 | PR = "r9" |
7 | PR = "r5" | ||
8 | 7 | ||
9 | SRC_URI = "file://xserver-nodm \ | 8 | SRC_URI = "file://xserver-nodm \ |
9 | file://xserver-nodm.service \ | ||
10 | file://gplv2-license.patch \ | 10 | file://gplv2-license.patch \ |
11 | " | 11 | " |
12 | S = ${WORKDIR} | 12 | S = ${WORKDIR} |
@@ -14,13 +14,29 @@ S = ${WORKDIR} | |||
14 | inherit allarch | 14 | inherit allarch |
15 | 15 | ||
16 | do_install() { | 16 | do_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 | ||
24 | RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit" | ||
25 | FILES_${PN} += "${base_libdir}/systemd/system/" | ||
26 | |||
22 | inherit update-rc.d | 27 | inherit update-rc.d |
23 | 28 | ||
24 | INITSCRIPT_NAME = "xserver-nodm" | 29 | INITSCRIPT_NAME = "xserver-nodm" |
25 | INITSCRIPT_PARAMS = "start 01 5 2 . stop 01 0 1 6 ." | 30 | INITSCRIPT_PARAMS = "start 01 5 2 . stop 01 0 1 6 ." |
26 | INITSCRIPT_PARAMS_shr = "start 90 5 2 . stop 90 0 1 6 ." | 31 | INITSCRIPT_PARAMS_shr = "start 90 5 2 . stop 90 0 1 6 ." |
32 | |||
33 | pkg_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 | } | ||