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 - use_launch Signed-off-by: Otavio Salvador <[email protected]> --- .../wayland/weston-init/weston-start | 39 +++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start index ff52ba3..63a459e 100755 --- a/meta/recipes-graphics/wayland/weston-init/weston-start +++ b/meta/recipes-graphics/wayland/weston-init/weston-start @@ -9,6 +9,24 @@ usage() { EOF } +## Module support +modules_dir=/usr/share/weston-start + +# Add weston extra argument +add_weston_argument() { + weston_args="$weston_args $1" +} + +# Add openvt extra argument +add_openvt_argument() { + openvt_args="$openvt_args $1" +} + +# Use weston-launch for initialization +use_launch() { + use_weston_launch=1 +} + if test $# -lt 2; then usage exit 1 @@ -32,10 +50,29 @@ done weston_args=$* +# Load and run modules +if [ -d "$modules_dir" ]; then + for m in "$modules_dir"/*; do + # Skip backup files + if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then + continue + fi + + # process module + . $m + done +fi + +if [ "$use_weston_launch" = "1" ]; then + weston_init=weston-launch +else + weston_init=weston +fi + if test -z "$XDG_RUNTIME_DIR"; then export XDG_RUNTIME_DIR=/run/user/`id -u` mkdir --parents $XDG_RUNTIME_DIR chmod 0700 $XDG_RUNTIME_DIR fi -exec openvt "$openvt_args" weston -- $weston_args /var/log/weston.log 2>&1 +exec openvt "$openvt_args" "$weston_init" -- $weston_args /var/log/weston.log 2>&1 -- 2.8.2 -- _______________________________________________ meta-freescale mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-freescale
