Thinking about this, a better solution would be to run a script like this (as root) on startup:
#!/bin/bash while [ -d ~/var ] ; do sleep 60; done echo b > /proc/sysrq-trigger
Does that look "safe"? I'm reluctant to test something so drastic without some oversight by someone more sane than me!
What would happen during normal system shutdown/reboot? Will this script have been killed by the time the kernel unmounts the filesystem?
What's the "correct" way to start a script like this as root on system startup?
Mark