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)
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
-fi
\ No newline at end of file
+ echo Running with x, not disowning!
+ fork &> /tmp/pndrun$BASENAME$mount.out
+fi