For misbehaving PNDs. Idea by LinuxSwat.
ofbset -fb /dev/fb1 -mem 0 -size 0 0 -en 0
fi
PND_EndTask
+
+ running_pnd_count=$(ps ax | grep "pnd_run.s[h]" | wc -l)
+ # restore settings if we are the last exiting pnd
+ # compare with 2 because one is used by subshell where "ps ax | ..." runs
+ if [ "$running_pnd_count" -eq "2" ]; then
+ PND_BeginTask "Restoring nub mode"
+ sed -n '1p' /etc/pandora/conf/nubs.state > /proc/pandora/nub0/mode
+ sed -n '7p' /etc/pandora/conf/nubs.state > /proc/pandora/nub1/mode
+ PND_EndTask
+ fi
+
PND_BeginTask "uMount the PND"
umountUnion
PND_EndTask