diff options
Diffstat (limited to 'meta/recipes-graphics')
3 files changed, 41 insertions, 8 deletions
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init.bb b/meta/recipes-graphics/x11-common/xserver-nodm-init.bb index 8490c81b48..e4508a917d 100644 --- a/meta/recipes-graphics/x11-common/xserver-nodm-init.bb +++ b/meta/recipes-graphics/x11-common/xserver-nodm-init.bb | |||
@@ -1,30 +1,52 @@ | |||
1 | DESCRIPTION = "Simple Xserver Init Script (no dm)" | 1 | SUMMARY = "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 | PR = "r31" | 5 | PR = "r31" |
6 | RDEPENDS_${PN} = "sudo xuser-account" | ||
7 | 6 | ||
8 | SRC_URI = "file://xserver-nodm \ | 7 | SRC_URI = "file://xserver-nodm \ |
9 | file://Xusername \ | 8 | file://Xusername \ |
10 | file://gplv2-license.patch" | 9 | file://gplv2-license.patch \ |
10 | file://xserver-nodm.service \ | ||
11 | file://xserver-nodm.conf \ | ||
12 | " | ||
11 | 13 | ||
12 | S = "${WORKDIR}" | 14 | S = "${WORKDIR}" |
13 | 15 | ||
16 | # Since we refer to ROOTLESS_X which is normally enabled per-machine | ||
14 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 17 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
15 | 18 | ||
19 | inherit update-rc.d systemd | ||
20 | |||
16 | do_install() { | 21 | do_install() { |
17 | install -d ${D}${sysconfdir} | ||
18 | install -d ${D}${sysconfdir}/init.d | 22 | install -d ${D}${sysconfdir}/init.d |
19 | install xserver-nodm ${D}${sysconfdir}/init.d | 23 | install xserver-nodm ${D}${sysconfdir}/init.d |
20 | if [ "${ROOTLESS_X}" = "1" ] ; then | 24 | |
21 | install -d ${D}${sysconfdir}/X11 | 25 | if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
22 | install Xusername ${D}${sysconfdir}/X11 | 26 | install -d ${D}${sysconfdir}/default |
27 | install xserver-nodm.conf ${D}${sysconfdir}/default/xserver-nodm | ||
28 | install -d ${D}${systemd_unitdir}/system | ||
29 | install -m 0644 ${WORKDIR}/xserver-nodm.service ${D}${systemd_unitdir}/system | ||
30 | if [ "${ROOTLESS_X}" = "1" ] ; then | ||
31 | sed -i 's!^HOME=.*!HOME=/home/xuser!' ${D}${sysconfdir}/default/xserver-nodm | ||
32 | sed -i 's!^User=.*!User=xuser!' ${D}${systemd_unitdir}/system/xserver-nodm.service | ||
33 | else | ||
34 | sed -i 's!^HOME=.*!HOME=${ROOT_HOME}!' ${D}${sysconfdir}/default/xserver-nodm | ||
35 | sed -i '/^User=/d' ${D}${systemd_unitdir}/system/xserver-nodm.service | ||
36 | fi | ||
37 | fi | ||
38 | |||
39 | if ${@base_contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | ||
40 | if [ "${ROOTLESS_X}" = "1" ] ; then | ||
41 | install -d ${D}${sysconfdir}/X11 | ||
42 | install Xusername ${D}${sysconfdir}/X11 | ||
43 | fi | ||
23 | fi | 44 | fi |
24 | } | 45 | } |
25 | 46 | ||
26 | inherit update-rc.d | 47 | RDEPENDS_${PN} = "${@base_conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}" |
27 | 48 | ||
28 | INITSCRIPT_NAME = "xserver-nodm" | 49 | INITSCRIPT_NAME = "xserver-nodm" |
29 | INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." | 50 | INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." |
51 | SYSTEMD_SERVICE_${PN} = "xserver-nodm.service" | ||
30 | 52 | ||
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf new file mode 100644 index 0000000000..3c0582a87e --- /dev/null +++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf | |||
@@ -0,0 +1 @@ | |||
HOME=/home/root | |||
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service new file mode 100644 index 0000000000..62d979f1d6 --- /dev/null +++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service | |||
@@ -0,0 +1,10 @@ | |||
1 | [Unit] | ||
2 | Description=Xserver startup without a display manager | ||
3 | |||
4 | [Service] | ||
5 | User=root | ||
6 | EnvironmentFile=/etc/default/xserver-nodm | ||
7 | ExecStart=/etc/X11/Xserver | ||
8 | |||
9 | [Install] | ||
10 | Alias=display-manager.service | ||