2017-02-17 10 views

답변

2

당신이 udev를 사용할 수있는이

(https://en.wikipedia.org/wiki/Udev)

당신이

udev에에게 규칙을 작성하기위한 https://wiki.archlinux.org/index.php/udev를 참조하려면 쉘 스크립트를 실행하는 장치에 대한 /etc/udev/rules.d에서의 udev 규칙을 작성합니다. 당신은 당신이 스크립트를 쓰기 그것을 위해 장치를 식별하기 위해 즉, USB VendorID 값제품 ID을 사용할 수 있습니다

KERNEL=="sd*", ATTRS{idVendor}=="12ba", ATTRS{idProduct}=="58ea", ATTRS{model}=="XYZ42", ATTRS{serial}=="123465789", RUN+="/pathto/script"

https://unix.stackexchange.com/questions/28548/how-to-run-custom-scripts-upon-usb-device-plug-in