For my needs, I have to execute something (take a picture) early in the boot process, and then shut down the machine as quickly as possible.
Right now, I have a script that does exactly that, it takes the picture about 18 seconds after a reset, and then it issues a
shutdown now command, which takes ~6-8 seconds to bring the system down. Right now I am just testing ideas, but in the end it will pull up some GPIO pin which will cause an Arduino to cut off the raspi power.
So I will have to write my own shutdown routine, which I guess it should do a
sync, unmount the root fs, and then pull up that GPIO.
Is there anything else that I should do to safe[ish]ly shut it down?