stopproc.sh
changeset 31 7101eae203e4
parent 30 068b147f99c2
child 38 648f8a87e709
--- a/stopproc.sh	Mon Jun 21 12:35:07 2010 +0100
+++ b/stopproc.sh	Mon Jun 21 13:23:44 2010 +0100
@@ -35,6 +35,9 @@
 	done
 	# give them a chance for last rites
 	sleep 5
+	echo "`date` stopproc: unmounting /data (2nd time)" >> /var/log/logrtc.log
+	/bin/umount /data
+
 fi
 
 checkdata=`mount | grep data`
@@ -52,5 +55,17 @@
 	done
 	# give them a chance for last rites
 	sleep 5
+	echo "`date` stopproc: unmounting /data (3nd time)" >> /var/log/logrtc.log
+	/bin/umount /data
 fi
 
+checkdata=`mount | grep data`
+if [ "$checkdata" != "" ]
+then
+	# really crap. Just reboot
+	echo "`date` Still can't umount /data - rebooting" >>/var/log/logrtc.log
+	/sbin/reboot
+fi
+
+echo "`date` Finished stopproc.sh" >>/var/log/logrtc.log
+