Run script upon USB mount

来源:互联网 发布:js设置select选中的值 编辑:程序博客网 时间:2024/06/04 08:35

You can add a udev rule for your specific device -- to do this, create a file called /etc/udev/010custom.rules (or something similar; just make sure numerically it is the smallest in the directory). The files contents will be:

BUS="usb", SYSFS{idVendor}="**IDVENDOR**", SYSFS{product}="**PRODUCT**", NAME="usb/%k", SYMLINK="DEVICE"

RUN+="/path/to/your/script"

原创粉丝点击