from Hacker News

Shutdown PC by removing SD Card

by TMK on 11/19/11, 11:04 AM with 2 comments

  • by asharp on 11/19/11, 12:48 PM

    Interesting, but why don't you use a udev rule?

    Something like KERNEL=="sdg", RUN+="/usr/bin/madagascar" and then you have madagascar check the environment variable ACTION for a 'remove', and when you see that run shutdown? (or just write straight into sysreq for instant poweroff)