I have grown accustomed to remote power on and off for my X1000. On by a small remote control mounted behind my monitor, and off by the "poff" shell command.
If I had a nickel for every time I've tried to "poff" the A1222, always getting "this model is not supported" or something like that.
So here's a little script to fix that. Just save this as s:shell/poff, then protect it with "protect s:shell/poff +s".
echo "Power Off in two seconds" Wait 2 echo >SER1:BAUD=38400/CONTROL=8N1/UNIT=1" "#s"
That's it! Obviously you could snap it off immediately without the Wait, but I did manage to invalidate my SYS: once that way, so perhaps letting the bits settle for two seconds might be preferable.
Not a big deal, but it might be handy for someone.
@LyleHaze IIRC the delay between the last write to a partition and flushing it's caches to the disk can be 5 seconds, better increase the number of seconds in the Wait command.
I'm not sure how the wait command is possibly helping here. It surely has no effect on anything else running. Isn't echo resident? If not, running echo doesn't write anything to disk does it? (except when using a redirection to a file)
@MickJT Echo doesn't delay anything nor write anything to the disk, and the Wait doesn't stop other running tasks from writing something to the disk. But if you start that "poff" shell script after stopping all applications which could write something to the disk you still have to wait up to 5 seconds before everything which may have been written to the partitions by those other, stopped applications was actually written to/copied back from caches to the disk before switching off the machine.
Your comments on the delay make sense. Even waiting five seconds is a poor substitute for actually inhibiting drive activity, then waiting for a proper response.
I originally ran it with no delay, and had to wait out a long validation on my next boot.
but it was wicked fast!
I'll look into a better way to verify that all disk io is completed.