Patchwork [5/9] weston-init: add xuser and enable user-sesssion-launch

login
register
mail settings
Submitter Valentin Popa
Date July 15, 2014, 8 a.m.
Message ID <1405411250-10594-5-git-send-email-valentin.popa@intel.com>
Download mbox | patch
Permalink /patch/75519/
State New
Headers show

Comments

Valentin Popa - July 15, 2014, 8 a.m.
(*) add xuser
(*) enable user-session-launch@.service for xuser (seat0-1000)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
---
 meta/recipes-graphics/wayland/weston-init.bb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index 60cdb8d..6eeeab0 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -13,10 +13,12 @@  do_install() {
        fi
 
        if ${@base_contains("DISTRO_FEATURES", "systemd", "true", "false", d)}; then
+               install -d ${D}/${sysconfdir}/systemd/system/graphical.target.wants
+               ln -sf ${systemd_unitdir}/system/user-session-launch@.service ${D}/${sysconfdir}/systemd/system/graphical.target.wants/user-session-launch@seat0-1000.service
        fi
 }
 
-inherit allarch update-rc.d
+inherit allarch update-rc.d useradd
 
 RDEPENDS_${PN} = "weston \
                   ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'kbd', '', d)} \
@@ -28,3 +30,8 @@  DEPENDS += "weston \
 
 INITSCRIPT_NAME = "${@base_contains('DISTRO_FEATURES', 'sysvinit', 'weston', '', d)}"
 INITSCRIPT_PARAMS = "${@base_contains('DISTRO_FEATURES', 'sysvinit', 'start 9 5 2 . stop 20 0 1 6 .', '', d)}"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--create-home \
+ --groups video,tty,audio,input,weston-launch \
+ --user-group xuser"