2

I want to execute the script on removal of usb drive. In that script I want to restart the server.
Is there any way to do the same ? I know I have to modify the rules in /etc/udev/rules.d/.

Sepero
  • 1,569
  • 3
  • 20
  • 29
user3153014
  • 239
  • 3
  • 9
  • please specify some more information to enable us to follow through. If what you want is to modify the script so as to restart your server everytime you remove a usb drive it is better to write your own script that wraps `usb remove` and also runs `reboot`. – nass Jul 16 '14 at 10:01
  • where should I call the script ? Is there any existing script which gets call on removing the usb ? – user3153014 Jul 16 '14 at 10:05
  • 1
    http://unix.stackexchange.com/questions/71348/why-doesnt-this-udev-rule-trigger-upon-removal-of-the-device ... not about a drive, but the basic principle should still apply. – tink Jul 16 '14 at 23:10

0 Answers0