diff options
Diffstat (limited to 'meta/recipes-graphics/wayland/weston-init/weston-start')
-rwxr-xr-x | meta/recipes-graphics/wayland/weston-init/weston-start | 26 |
1 files changed, 26 insertions, 0 deletions
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() { | |||
9 | EOF | 9 | EOF |
10 | } | 10 | } |
11 | 11 | ||
12 | ## Module support | ||
13 | modules_dir=@DATADIR@/weston-start | ||
14 | |||
15 | # Add weston extra argument | ||
16 | add_weston_argument() { | ||
17 | weston_args="$weston_args $1" | ||
18 | } | ||
19 | |||
20 | # Add openvt extra argument | ||
21 | add_openvt_argument() { | ||
22 | openvt_args="$openvt_args $1" | ||
23 | } | ||
24 | |||
12 | if test $# -lt 2; then | 25 | if test $# -lt 2; then |
13 | usage | 26 | usage |
14 | exit 1 | 27 | exit 1 |
@@ -32,6 +45,19 @@ done | |||
32 | 45 | ||
33 | weston_args=$* | 46 | weston_args=$* |
34 | 47 | ||
48 | # Load and run modules | ||
49 | if [ -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 | ||
59 | fi | ||
60 | |||
35 | if test -z "$XDG_RUNTIME_DIR"; then | 61 | if 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 |