Hi everybody, this is my first post here.
I want to show you an idea, hope to read your feedbacks.
Basically, it consists in a tool that lets you safely shutdown a RP by unplugging a specific USB device. It comes handy to avoid hard-shutdown by unplugging power supply when you use a headless RP-based system, e.g. a print server, and you can't (or you don't know how to) connect over SSH and run the proper shutdown command.
Based on `udev`, mechanism is simple:
1) User configures the desired USB device to be used as a "shutdown handler", and it can be a flash/external drive, SD/MMC adapter, WiFi adapter, printer, etc.
2) This tool silently waits for the "Removed Device" message and if the removed device is the preferred device then it run `shutdown -h now`
I wrote a more explanatory post on my blog: "How I shutdown my Raspberry Pi" and released source code on GitHub: unplug2shutdown.
What you guys think? is it worth spending work on?
Ciao!
