Hi,
On 2006-09-03 at 18:14:01 +0200, Michael Prokop mika@grml.org wrote:
I'd like to ask for your comments about handling of external usb devices on grml.
Really nice work!
Out of interest: Would you want this to be part of udev.deb or do you want to ship it in a separated package, so you could also install it on any debian system?
/mnt/external[1] will be left without any changes, we will stay completely backwards compatible. Additionally we will create /dev/usb-sd* devices via udev rules like:
# cat /etc/udev/usbpen.rules SUBSYSTEM=="block", BUS=="usb", KERNEL=="sd[a-z]*", ACTION=="add", SYMLINK+="usb-%k", GROUP="users", NAME="%k" SUBSYSTEM=="block", BUS=="usb", KERNEL=="sd[a-z]*", ACTION=="add", RUN+="/bin/mkdir -p /mnt/usb-%k" SUBSYSTEM=="block", BUS=="usb", KERNEL=="sd[a-z]*", ACTION=="add", RUN+="/bin/sleep 2" SUBSYSTEM=="block", BUS=="usb", KERNEL=="sd[a-z]*", ACTION=="add", RUN+="/usr/sbin/create_mnt_labels" SUBSYSTEM=="block", BUS=="usb", KERNEL=="sd[a-z]*", ACTION=="add", RUN+="/usr/sbin/rebuildfstab -r -u 1000 -g 1000"
May I suggest s/BUS/SUBSYSTEMS/ according to the recent changes in upstream udev. Or we might completely loose one of SUBSYSTEM or BUS/SUBSYSTEMS, but I'd have to test that.
ACTION=="remove", KERNEL=="sd[a-z]*", RUN+="/usr/sbin/rebuildfstab -r -u 1000 -g 1000" ACTION=="remove", KERNEL=="sd[a-z]*", RUN+="/bin/rmdir /mnt/usb-%k", OPTIONS="last_rule"
Purely cosmetic: Reordering the directives (ACTION being first on "add" and "remove") would improve readability.
[snip]
If you want to disable the above feature at all on your grml system you would just have to remove the according udev rules file. This will be documented of course.
Better just put the real rules file in /etc/udev and symlink it to /etc/udev/rules.d like we already do with the current rules.
Please let me know what you think about it. If you're happy with this solutions I'd implement it so you can test it in real-live with the upcoming grml 0.7-1 devel-release.
That would be 0.8-1, wouldn't it? ;-)
Cheers, Tobias