summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2016-05-18 13:40:45 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-21 22:24:56 +0100
commit5afb6a9cd54769d97ed58a9cbfd33a3e57cb2968 (patch)
tree11dfe27dbaa730151781c18eac8461351a4abe42 /meta/recipes-graphics
parent71b356669268a2210f159287bdc2be53e4f3fdf7 (diff)
downloadpoky-5afb6a9cd54769d97ed58a9cbfd33a3e57cb2968.tar.gz
weston-init: Add module support for the weston-start helper
To make weston-start more flexible we now support module loading. For such modules, following functions can be used: - add_weston_argument - add_openvt_argument (From OE-Core rev: 3e7c4d06aaa1fccc1a18f4431122603cc4a9bbe9) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/wayland/weston-init.bb3
-rwxr-xr-xmeta/recipes-graphics/wayland/weston-init/weston-start26
2 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index 3a2251e69a..e4e2701af7 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -11,7 +11,10 @@ S = "${WORKDIR}"
11do_install() { 11do_install() {
12 install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston 12 install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
13 install -Dm0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service 13 install -Dm0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service
14
15 # Install weston-start script
14 install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start 16 install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
17 sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
15} 18}
16 19
17inherit allarch update-rc.d distro_features_check systemd 20inherit allarch update-rc.d distro_features_check systemd
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start
index dc2b1efc78..4aa7c66d3b 100755
--- a/meta/recipes-graphics/wayland/weston-init/weston-start
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -9,6 +9,19 @@ usage() {
9EOF 9EOF
10} 10}
11 11
12## Module support
13modules_dir=@DATADIR@/weston-start
14
15# Add weston extra argument
16add_weston_argument() {
17 weston_args="$weston_args $1"
18}
19
20# Add openvt extra argument
21add_openvt_argument() {
22 openvt_args="$openvt_args $1"
23}
24
12if test $# -lt 2; then 25if test $# -lt 2; then
13 usage 26 usage
14 exit 1 27 exit 1
@@ -32,6 +45,19 @@ done
32 45
33weston_args=$* 46weston_args=$*
34 47
48# Load and run modules
49if [ -d "$modules_dir" ]; then
50 for m in "$modules_dir"/*; do
51 # Skip backup files
52 if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then
53 continue
54 fi
55
56 # process module
57 . $m
58 done
59fi
60
35if test -z "$XDG_RUNTIME_DIR"; then 61if test -z "$XDG_RUNTIME_DIR"; then
36 export XDG_RUNTIME_DIR=/run/user/`id -u` 62 export XDG_RUNTIME_DIR=/run/user/`id -u`
37 mkdir --parents $XDG_RUNTIME_DIR 63 mkdir --parents $XDG_RUNTIME_DIR