summaryrefslogtreecommitdiffstats
path: root/meta-agl/recipes-graphics/wayland/weston-init.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl/recipes-graphics/wayland/weston-init.bbappend')
-rw-r--r--meta-agl/recipes-graphics/wayland/weston-init.bbappend20
1 files changed, 20 insertions, 0 deletions
diff --git a/meta-agl/recipes-graphics/wayland/weston-init.bbappend b/meta-agl/recipes-graphics/wayland/weston-init.bbappend
new file mode 100644
index 000000000..9b0f434e5
--- /dev/null
+++ b/meta-agl/recipes-graphics/wayland/weston-init.bbappend
@@ -0,0 +1,20 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+WESTONTTY ??= "1"
+WESTONUSER ??= "root"
+WESTONARGS ?= "--idle-time=4294967"
+WESTONLAUNCHARGS ??= "--tty /dev/tty${WESTONTTY} --user ${WESTONUSER}"
+
+do_install_append() {
+ sed -e 's,launcher="weston-launch.*--",launcher="weston-launch ${WESTONLAUNCHARGS} --",g' \
+ -e 's,exec openvt $openvt_args --,exec ,g' \
+ -i ${D}${bindir}/weston-start
+
+ sed -e 's,User=root,User=${WESTONUSER},g' \
+ -e 's,$OPTARGS,${WESTONARGS} $OPTARGS,g' \
+ -i ${D}${systemd_system_unitdir}/weston.service
+
+ sed -i "/\[Unit\]/aConflicts=getty@tty${WESTONTTY}.service" \
+ ${D}${systemd_system_unitdir}/weston.service
+}
+