From 4f9c9c55c77be4aad536e1eab25fb146e47487f8 Mon Sep 17 00:00:00 2001 From: vimacs Date: Wed, 10 Mar 2010 21:20:25 +0100 Subject: [PATCH] fixed check for running x modified: testdata/scripts/pnd_run.sh --- testdata/scripts/pnd_run.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/testdata/scripts/pnd_run.sh b/testdata/scripts/pnd_run.sh index 0c4cb18..c663cbe 100755 --- a/testdata/scripts/pnd_run.sh +++ b/testdata/scripts/pnd_run.sh @@ -51,7 +51,6 @@ if [ ! $PND ]; then #check if theres a pnd suplied, need to clean that up a bit echo "Usage: pnd_run.sh -p your.pnd -e executeable [-a \"(arguments)\"] [ -s \"cd to folder inside pnd\"] [-b UID (name of mountpoint/pandora/appdata)] [-x close x before launching(script needs to be started with nohup for this to work]" exit 1 fi - if [ ! $EXENAME ]; then if [ ! $mount ] && [ ! $umount ]; then echo "Usage: pnd_run.sh -p your.pnd -e executeable [-a \"(arguments)\"] [ -s \"cd to folder inside pnd\"] [-b UID (name of mountpoint/pandora/appdata)] [-x close x before launching(script needs to be started with nohup for this to work]" @@ -63,7 +62,7 @@ fi fork () { echo in fork! if [ $nox ]; then #the app doesnt want x to run, so we kill it and restart it once the app quits - if [ $(pidof X) ]; then + if [ ! $(pidof X) ]; then unset $nox else applist=$(lsof /usr/lib/libX11.so.6 | awk '{print $1}'| sort | uniq) @@ -231,22 +230,22 @@ if [ $? -eq 0 ]; then # check if the umount was successfull, if it wasnt it woul sudo rmdir /mnt/pnd/$BASENAME #delete pnd mountpoint echo cleanup done else -echo umount failed, didnt clean up + echo umount failed, didnt clean up fi if [ $nox ]; then #restart x if it was killed -echo "starting x in 5s" -sleep 5 -sudo /etc/init.d/slim-init start + echo "starting x in 5s" + sleep 5 + sudo /etc/init.d/slim-init start fi } #function end! if [ $nox ]; then -echo forking now! -fork &> /tmp/pndrun$BASENAME$mount.out & -disown + echo forking now! + fork &> /tmp/pndrun$BASENAME$mount.out & + disown else -echo Running with x, not disowning! -fork &> /tmp/pndrun$BASENAME$mount.out + echo Running with x, not disowning! + fork &> /tmp/pndrun$BASENAME$mount.out fi \ No newline at end of file -- 2.39.5