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
2020-07-06 16:05:28 +02:00

16 lines
734 B
Plaintext

# ---------------------------------------------------------------------------
# Run a script (using a systemd-service) after plugin of an usb-stick.
#
# Running the script directly fails, since udev only allows short-running scripts.
#
# Author: Bernhard Bablok
# License: GPL3
#
# Website: https://github.com/bablokb/pi-imgtank
#
# ---------------------------------------------------------------------------
#KERNEL=="sd?", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/bin/systemctl --no-block start copy_img2@$kernel.service"
KERNEL=="sd[a-z]*", SUBSYSTEM=="block", ACTION=="add", RUN+="/bin/systemctl --no-block start copy_img2@$kernel.service"
#KERNEL=="sd[a-z]*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/local/bin/trigger.sh"