summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/udev/usb-storage.rules
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-06-24 04:11:53 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-06-24 04:11:53 (GMT)
commit864870e814560a7f0915444fb23d4a223dddc25e (patch)
treefed0bf1e20f49f3fde1800123eebb4fd55ff2610 /abs/core-testing/udev/usb-storage.rules
parent7146d00d725637e34c6295130853e4138093ed0c (diff)
downloadlinhes_pkgbuild-864870e814560a7f0915444fb23d4a223dddc25e.zip
linhes_pkgbuild-864870e814560a7f0915444fb23d4a223dddc25e.tar.gz
linhes_pkgbuild-864870e814560a7f0915444fb23d4a223dddc25e.tar.bz2
Allows for auto mounting of USB storage devices in /media/usb%.
Diffstat (limited to 'abs/core-testing/udev/usb-storage.rules')
-rw-r--r--abs/core-testing/udev/usb-storage.rules7
1 files changed, 7 insertions, 0 deletions
diff --git a/abs/core-testing/udev/usb-storage.rules b/abs/core-testing/udev/usb-storage.rules
new file mode 100644
index 0000000..97cdca3
--- /dev/null
+++ b/abs/core-testing/udev/usb-storage.rules
@@ -0,0 +1,7 @@
+KERNEL=="sd[a-z]", NAME="%k", SYMLINK+="usb%m", GROUP="users", OPTIONS="last_rule"
+ACTION=="add", KERNEL=="sd[a-z][0-9]", SYMLINK+="usb%n", GROUP="users", NAME="%k"
+ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mkdir -p /media/usb%n"
+ACTION=="add", KERNEL=="sd[a-z][0-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 /dev/%k /media/usb%n", OPTIONS="last_rule"
+ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/%k /media/usb%n", OPTIONS="last_rule"
+ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/umount -l /media/usb%n"
+ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/rmdir /media/usb%n", OPTIONS="last_rule"