This repository has been archived on 2024-05-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
pi-imgtank/files/etc/udev/rules.d/99-usbhalt.rules
T
2020-07-06 16:05:28 +02:00

18 lines
661 B
Plaintext

# ---------------------------------------------------------------------------
# Shutdown the system after plugout of an usb-storage device.
#
# !!! To activate the rule, remove the comment (#) in front of it !!!
#
# Note that the script is called directly. It will only do some
# sanity checks and then initiate system halt, so there should be no
# issue because of the runtime of the script.
#
# Author: Bernhard Bablok
# License: GPL3
#
# Website: https://github.com/bablokb/pi-imgtank
#
# ---------------------------------------------------------------------------
#KERNEL=="sd?", SUBSYSTEMS=="usb", ACTION=="remove", RUN+="/usr/local/sbin/halt_on_plugout"