Added draft for auto-usb-backup

This commit is contained in:
2023-04-26 11:51:26 +02:00
parent cc4e32af87
commit 6a4439ba57
4 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1 @@
ATTRS{idVendor}=="152d", ATTRS{idProduct}=="2329", RUN+="/tmp/test.sh"

View File

@@ -0,0 +1,8 @@
#! /bin/sh
env >>/tmp/test.log
file "/sys${DEVPATH}" >>/tmp/test.log
if [ "${ACTION}" = add -a -d "/sys${DEVPATH}" ]; then
echo "add ${DEVPATH}" >>/tmp/test.log
fi