[Grml] Re: [Grml-devel] RFC: handling of external usb devices
Michael Prokop
mika at grml.org
Sun Sep 3 19:01:07 CEST 2006
* Tobias Klauser <tklauser at grml.org> [20060903 18:54]:
> On 2006-09-03 at 18:14:01 +0200, Michael Prokop <mika at grml.org> wrote:
> > I'd like to ask for your comments about handling of external usb
> > devices on grml.
> Really nice work!
Thanks. :)
> 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?
I think our udev package would be the right place for shipping the
udev rules. Therefore the rules file can be updated with any
upstream changes in udev as well.
> > # 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.
Thanks.
> > 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.
Good catch, thanks.
> > 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.
Oh, sure.
> > 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? ;-)
Of course, another good catch - thanks. :)
Tobias, can you work on the udev package? I'd implement the rest in
the meanwhile. (Let's meet on IRC for further questions.)
thx && regards,
-mika-
--
http://grml.org/ # Linux for texttool-users and sysadmins
http://wiki.grml.org/ # share your knowledge
http://grml.supersized.org/ # the grml development weblog
#grml @ irc.freenode.org # meet us on irc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.mur.at/pipermail/grml/attachments/20060903/0721ab67/attachment-0001.pgp
More information about the Grml
mailing list