summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/wayland/weston-init/weston-start
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/wayland/weston-init/weston-start')
-rwxr-xr-xmeta/recipes-graphics/wayland/weston-init/weston-start36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start
new file mode 100755
index 0000000000..b791fd5a9b
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -0,0 +1,36 @@
1#!/bin/sh
2# Copyright (C) 2016 O.S. Systems Software LTDA.
3
4export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
5
6usage() {
7 cat <<EOF
8 $0 <openvt arguments> -- <weston options>
9EOF
10}
11
12if test $# -lt 2; then
13 usage
14 exit 1
15fi
16
17openvt_args=""
18while [ -n "$1" ]; do
19 openvt_args="$openvt_args $1"
20 shift
21
22 if [ "$1" = "--" ]; then
23 shift
24 break
25 fi
26done
27
28weston_args=$*
29
30if test -z "$XDG_RUNTIME_DIR"; then
31 export XDG_RUNTIME_DIR=/run/user/`id -u`
32 mkdir --parents $XDG_RUNTIME_DIR
33 chmod 0700 $XDG_RUNTIME_DIR
34fi
35
36exec openvt $openvt_args -- weston $weston_args --log=/var/log/weston.log