From 269b2707a7ae5cf8b41afbfac372b4e843e2673d Mon Sep 17 00:00:00 2001 From: Albert Zhang Date: Wed, 7 May 2014 19:19:14 +0800 Subject: fix provider script path --- bin/stella_unity_2d3d_check | 48 ------------------------------------ bin/unity_2d3d_check | 48 ++++++++++++++++++++++++++++++++++++ jobs/stella/hp-particular.txt.in | 2 +- jobs/stella/third-party-addon.txt.in | 2 +- 4 files changed, 50 insertions(+), 50 deletions(-) delete mode 100755 bin/stella_unity_2d3d_check create mode 100755 bin/unity_2d3d_check diff --git a/bin/stella_unity_2d3d_check b/bin/stella_unity_2d3d_check deleted file mode 100755 index 87825bd..0000000 --- a/bin/stella_unity_2d3d_check +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -session_status=null -result=0 - -# function to parse session type info into easy-to-understand 2D/3D info - function get_2d3d_info { - # usage: get_2d3d_info session_type_info - if [ "$1" == "ubuntu" ] - then - echo 3D - elif [ "$1" == "ubuntu-2d" ] - then - echo 2D - fi - } - -# get session info - loggedin_session=`cat $HOME/.dmrc | grep Session | cut -f2 -d'='` - running_seesion=$DESKTOP_SESSION # in lightdm's src/display.c: - # $DESKTOP_SESSION is marked "apparently deprecated" - # Its replacement $GDMSESSION is marked "not cross-desktop" - # Might require modification on this part in the future if - # $DESKTOP_SESSION is completely deprecated. - -# parse "logged-in session type" & "$DESKTOP_SESSION type" into easy-to-understand 2D/3D info - # session( session_type_info session_2d3d_type) - expected_session=( $loggedin_session `get_2d3d_info $loggedin_session`) # session selected during user login - actual_session=( $running_seesion `get_2d3d_info $running_seesion`) # session that is actually running - - -# check if "logged in session info" & "desktop_session info" matches - if [ "${expected_session[0]}" == "${actual_session[0]}" ] - then - session_status="MATCHES!" - result=0 - else - session_status="DOES NOT MATCH!" - result=1 - fi - - session_check="User is logged into '${expected_session[0]}' session (${expected_session[1]} mode),\n -session is running in '${actual_session[0]}' (${actual_session[1]} mode).\n -Logged in session and actual running session $session_status" - -# output checked results - zenity --info --text="$session_check" - exit $result diff --git a/bin/unity_2d3d_check b/bin/unity_2d3d_check new file mode 100755 index 0000000..87825bd --- /dev/null +++ b/bin/unity_2d3d_check @@ -0,0 +1,48 @@ +#!/bin/sh + +session_status=null +result=0 + +# function to parse session type info into easy-to-understand 2D/3D info + function get_2d3d_info { + # usage: get_2d3d_info session_type_info + if [ "$1" == "ubuntu" ] + then + echo 3D + elif [ "$1" == "ubuntu-2d" ] + then + echo 2D + fi + } + +# get session info + loggedin_session=`cat $HOME/.dmrc | grep Session | cut -f2 -d'='` + running_seesion=$DESKTOP_SESSION # in lightdm's src/display.c: + # $DESKTOP_SESSION is marked "apparently deprecated" + # Its replacement $GDMSESSION is marked "not cross-desktop" + # Might require modification on this part in the future if + # $DESKTOP_SESSION is completely deprecated. + +# parse "logged-in session type" & "$DESKTOP_SESSION type" into easy-to-understand 2D/3D info + # session( session_type_info session_2d3d_type) + expected_session=( $loggedin_session `get_2d3d_info $loggedin_session`) # session selected during user login + actual_session=( $running_seesion `get_2d3d_info $running_seesion`) # session that is actually running + + +# check if "logged in session info" & "desktop_session info" matches + if [ "${expected_session[0]}" == "${actual_session[0]}" ] + then + session_status="MATCHES!" + result=0 + else + session_status="DOES NOT MATCH!" + result=1 + fi + + session_check="User is logged into '${expected_session[0]}' session (${expected_session[1]} mode),\n +session is running in '${actual_session[0]}' (${actual_session[1]} mode).\n +Logged in session and actual running session $session_status" + +# output checked results + zenity --info --text="$session_check" + exit $result diff --git a/jobs/stella/hp-particular.txt.in b/jobs/stella/hp-particular.txt.in index 205717f..0c263c3 100644 --- a/jobs/stella/hp-particular.txt.in +++ b/jobs/stella/hp-particular.txt.in @@ -13,7 +13,7 @@ _description: plugin: manual id: stella/hp-particular/build_valid_check -command: bash ${PLAINBOX_PROVIDER_DATA}/../scripts/stella_compatibilityChecker -r +command: stella_compatibilityChecker -r _description: PURPOSE: Verify build notification diff --git a/jobs/stella/third-party-addon.txt.in b/jobs/stella/third-party-addon.txt.in index 0e7c26a..449c697 100644 --- a/jobs/stella/third-party-addon.txt.in +++ b/jobs/stella/third-party-addon.txt.in @@ -41,7 +41,7 @@ _description: plugin: manual id: stella/third-party-addon/Unity-mode-default3d -command: bash ${PLAINBOX_PROVIDER_DATA}/../scripts/stella_unity_2d3d_check +command: unity_2d3d_check _description: PURPOSE: 1. Check if default desktop session is set to 3D -- cgit v1.2.3