0
The following is taken from an embedded system which does not have hard drive in it.
KERNEL=="sd?", SUBSYSTEMS=="usb", DRIVERS=="usb-storage", NAME="sda"
KERNEL=="sd?2", SUBSYSTEMS=="usb", DRIVERS=="usb-storage", NAME="sda2" RUN+="/bin/mount -n -o sync /dev/sda2 /media/usb2"
KERNEL=="sda2" ACTION=="remove", RUN+="/bin/umount -n /media/usb2"
Is it for auto mount and unmount? Can anyone provide brief explanation?
Thanks.
Thanks invert. Could you please share what does the first line mean? – New to Rails – 2013-11-25T07:46:19.630
The first line will match like the rest of the rules, but there is no action associated with it. It is obviously added as a template for you to reuse in your own rules. For more on udev see http://reactivated.net/writing_udev_rules.html
– invert – 2013-11-26T13:44:43.993