Patchwork [meta-oe,2/2] xserver-nodm-init: add EnvironmentFile

login
register
mail settings
Submitter Martin Jansa
Date April 10, 2012, 5:59 a.m.
Message ID <c55ca91ae7203a1fe164a1a91230b970fc075759.1334037469.git.Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/25491/
State Accepted
Commit 2cb1ae5c172d51df200cc09eb04ddae66bef6b6c
Headers show

Comments

Martin Jansa - April 10, 2012, 5:59 a.m.
* used to set HOME variable before /etc/X11/Xsession is started
* e.g. enlightenment is creating ${HOME}/.e and without this it ends in
  /tmp/.e and during startup HOME gets defined and switched to
  /home/root/.e

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../xserver-nodm-init-2.0/xserver-nodm.conf        |    1 +
 .../xserver-nodm-init-2.0/xserver-nodm.service     |    1 +
 .../xserver-nodm-init/xserver-nodm-init_2.0.bb     |    7 ++++++-
 3 files changed, 8 insertions(+), 1 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/xserver-nodm.conf
Otavio Salvador - April 10, 2012, 11:21 a.m.
On Tue, Apr 10, 2012 at 02:59, Martin Jansa <martin.jansa@gmail.com> wrote:
> * used to set HOME variable before /etc/X11/Xsession is started
> * e.g. enlightenment is creating ${HOME}/.e and without this it ends in
>  /tmp/.e and during startup HOME gets defined and switched to
>  /home/root/.e
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>

Agreed :-)

Acked-by: Otavio Salvador <otavio@ossystems.com.br>

Patch

diff --git a/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/xserver-nodm.conf b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/xserver-nodm.conf
new file mode 100644
index 0000000..3c0582a
--- /dev/null
+++ b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/xserver-nodm.conf
@@ -0,0 +1 @@ 
+HOME=/home/root
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
index a35d70e..c15a772 100644
--- 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
@@ -2,6 +2,7 @@ 
 Description=Xserver startup with a display manager
 
 [Service]
+EnvironmentFile=/etc/default/xserver-nodm
 ExecStart=/usr/bin/xinit /etc/X11/Xsession -- /etc/X11/Xserver
 
 [Install]
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 36d9bfc..62c33c9 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
@@ -3,10 +3,11 @@  LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 SECTION = "x11"
 
-PR = "r14"
+PR = "r16"
 
 SRC_URI = "file://xserver-nodm \
            file://xserver-nodm.service \
+           file://xserver-nodm.conf \
            file://gplv2-license.patch \
 "
 S = "${WORKDIR}"
@@ -25,7 +26,11 @@  SYSTEMD_SERVICE_${PN}-systemd = "xserver-nodm.service"
 do_install() {
 	install -d ${D}${sysconfdir}/init.d
 	install xserver-nodm ${D}${sysconfdir}/init.d
+	install -d ${D}${sysconfdir}/default
+	install xserver-nodm.conf ${D}${sysconfdir}/default/xserver-nodm
 }
 
+FILES_${PN}-systemd += "${sysconfdir}/default/xserver-nodm"
+
 RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit"
 RDEPENDS_${PN}-systemd += "xserver-common (>= 1.30) xinit"