USUAL think-before-you-act WARNING:
Please read the entire README before proceeding!
I wrote these scripts to scratch a personal itch. 
I don't guarantee them to work for anybody else (and coding errors happen sometimes) - be careful and backup your data before using the scripts ; don't rely on them ; use at your own risk.
If in doubt, double check the scripts by reading them ; if still in doubt, simply don't use them.

Otherwise: feel free to use/modify/enjoy - It'd be nice if you sent updates my way if/when you improve it :)


Dependencies:
	- The scripts rely on the _installed_ set of UI primitives (check out WIKI or the M92 devel thread for them).

Installation:
	- be safe and backup your precious data :)
	- if it's the first time installation, backup your onyx version of appstart.sh using backup_appstart.oar
		This'll create a backup version in the current directory that can be restored with restore_appstart.oar, if things go wrong.
		There's also a copy of Onyx's original appstart.sh in the onyxversion.backup that you may copy into the current directory in case you forgot (it's the 1.7RC26/03/12 version, though it is unlikely to change a lot between versions)
	- use the install/uninstall scripts, which copy the essential parts into internal memory and modify /etc/appstart.sh to start them upon boot.
		The install script will ask you whether you want to start the watchdog at boot time. While I took care trying not to break things, this choice is up to you.

Use:
	- If you decided not to start it at boot time (you will still have to 'install' it), you'll have to start it manually upon reboot by using start_sdc_watchdog.oar
	- You can always check the current installation and runtime status with test_success.oar
	
What it does:
	- Whenever it detects a removal of the SDCard, it unmounts the respective directory (happens when a nasty user simply removes the card without using the 'remove' functionality in the menu :p )
	- Whenever it detects an insertion of the SDCard, it tests whether it can write to the card and issues a warning to the user, if it cannot.
		Moreover, it starts a space checker script which tests the remaining space on the SDCard (by default) every 5 minuts. 
		If the remaining space falls below (by default) 10MB, the checker script issues a warning to the user and QUITS (no more warnings, until it is started upon reinsertion of the card).
	- the interval can be changed by modifying the variables on top of the check_free_space.oar script (the ones that are not commented out by a preceding '#')
		Note that the watchdog starts the _installed_ copy of the checker script... so you need to change that one, or do a reinstallation, if you merely changed the version on sd card ;) 

What, if things should go wrong (they shouldn't ;) ):
	The most likely thing to go wrong is that the scripts get into an inconsistent state and stop working until restarted. (Consider them beta)
	Consequence: Don't fully rely on them! They're there to reduce the chances of you losing data because you cannot write onto, e.g., a write protected medium - but they might fail.
	
	The next likely thing to go wrong is a problem updating the boot scripts at installation or de-installation.
	Consequence: The device may not boot anymore (this can be fixed). If you don't feel comfortable with this risk, then do not choose to have the install scripts to let SDC_Watchdog start at boot time (see above).
	How to react: 
		- The problem is booting rather than immediate crashes - so the first step should be to backup your data
		- The second step is to use restore_appstart.oar to reinstall your backed up version of appstart.sh (remember? :) )
		This should fix it (device should boot again) - run test_success.oar to check state... if there's forseeable trouble, it should issue warnings.
	If the device does not boot (should not happen - at least it does not for me):
		- reinstall firmware as described in manual with the usual consequences.

