diff options
author | Jonathan Bauer | 2012-01-25 15:48:48 +0100 |
---|---|---|
committer | Jonathan Bauer | 2012-01-25 15:48:48 +0100 |
commit | 9a8769bf66197cf5de835a7e0d931d6219fc95d6 (patch) | |
tree | dc4afe6bdf459ab97ff6b0d093e8fd8040ce99bd /testApp.sh | |
parent | fix for QT 4.8: setting header for POST (diff) | |
download | fbgui-9a8769bf66197cf5de835a7e0d931d6219fc95d6.tar.gz fbgui-9a8769bf66197cf5de835a7e0d931d6219fc95d6.tar.xz fbgui-9a8769bf66197cf5de835a7e0d931d6219fc95d6.zip |
removed cdhcpcd path from config, now through testApp. Added root check if ND is activated
Diffstat (limited to 'testApp.sh')
-rwxr-xr-x | testApp.sh | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -11,7 +11,21 @@ # -s <path>, --serial=<path> sets path to serial number file # # Note: all path are expected to be absolute. +# +# Adapt these to your own system. QT_VERSION=Qt-4.7.2 +PATH_TO_FBGUI_BUILD=/home/joe/workspace/fbgui + +# check if network discovery is activated and if running as root +for ARG in $* +do +if [ "x$ARG" = "x-n" ]; then + if [ $(whoami) != "root" ]; then + echo "Network Discovery activated, you need to be root." + exit 1; + fi +fi +done # clean /tmp/fbgui [ -d /tmp/fbgui ] && rm -rf /tmp/fbgui @@ -31,6 +45,6 @@ display_id=$(grep -n $(whoami) /etc/passwd| head -n 1|awk -F : '{print $1}') # quick sleep to wait for qvfb loading sleep 0.2 # Start fbgui connecting to QVFb with display_id from above. -$working_path/build/src/fbgui/fbgui -display QVFb:$display_id $@ +$PATH_TO_FBGUI_BUILD/src/fbgui/fbgui -display QVFb:$display_id $@ -e $PATH_TO_FBGUI_BUILD/src/customdhcpcd/cdhcpcd # kill qvfb since fbgui stopped killall qvfb |