[meta-freescale] [meta-fsl-arm][PATCH 17/25] weston-init: Update weston-init for i.MX wayland

Otavio Salvador otavio at ossystems.com.br
Mon Oct 28 11:10:55 PDT 2013


From: Lauren Post <lauren.post at freescale.com>

Change-Id: Ia893b3c588e8f368464b420d0cc7defe157761c0
Signed-off-by: Lauren Post <lauren.post at freescale.com>
---
 recipes-graphics/wayland/weston-init.bbappend |  4 ++
 recipes-graphics/wayland/weston-init/init     | 56 +++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)
 create mode 100644 recipes-graphics/wayland/weston-init.bbappend
 create mode 100644 recipes-graphics/wayland/weston-init/init

diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend
new file mode 100644
index 0000000..fdc6473
--- /dev/null
+++ b/recipes-graphics/wayland/weston-init.bbappend
@@ -0,0 +1,4 @@
+# Replace Weston init script
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+PACKAGE_ARCH_mx6 = "${MACHINE_ARCH}"
\ No newline at end of file
diff --git a/recipes-graphics/wayland/weston-init/init b/recipes-graphics/wayland/weston-init/init
new file mode 100644
index 0000000..ce75061
--- /dev/null
+++ b/recipes-graphics/wayland/weston-init/init
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides: weston
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+### END INIT INFO
+
+killproc() {
+        pid=`/bin/pidof $1`
+        [ "$pid" != "" ] && kill $pid
+}
+
+read CMDLINE < /proc/cmdline
+for x in $CMDLINE; do
+        case $x in
+        weston=false)
+		echo "Weston disabled"
+		exit 0;
+                ;;
+        esac
+done
+
+case "$1" in
+  start)
+        . /etc/profile
+
+        # This is all a nasty hack
+        if test -z "$XDG_RUNTIME_DIR"; then
+                export XDG_RUNTIME_DIR=/var/run/user/root
+                mkdir --parents $XDG_RUNTIME_DIR
+                chmod 0700 $XDG_RUNTIME_DIR
+        fi
+
+        weston &
+  ;;
+
+  stop)
+        echo "Stopping Weston"
+        killproc weston
+  ;;
+
+  restart)
+	$0 stop
+        sleep 1
+        $0 start
+  ;;
+
+  *)
+        echo "usage: $0 { start | stop | restart }"
+  ;;
+esac
+
+exit 0
-- 
1.8.4.rc3




More information about the meta-freescale mailing list