Situation
The computer (running Ubuntu 14.04) is connected to a networked device which controls the power supply to the computer itself.
On receiving a certain signal A
, the computer must send a signal B
to this networked device which (among other stuff) will cut power to the computer.
Question
When should I send this signal B
to the networked device so as to minimize the damage done from the power cut?
I assume I can trigger the shutdown sequence with signal A
and somewhere along the shutdown sequence, send signal B
. But when should I actually send it?
I assume my /etc/rc0.d
would look something like below
K98signalB # Actually sends signalB to cut power
K99networking # Renamed from K01networking, since I need to keep networking alive