From: Scott James Remnant <scott@ubuntu.com>
To: linux-hotplug@vger.kernel.org
Subject: Moving Ubuntu to upstream udev rules (Part 2)
Date: Mon, 22 Dec 2008 14:20:29 +0000 [thread overview]
Message-ID: <1229955629.6944.63.camel@quest> (raw)
[-- Attachment #1: Type: text/plain, Size: 6669 bytes --]
Have now resync'd with the changes confirmed in the last thread, which
leaves just a handful of other bits (some of which mentioned before,
some of which I found in the later audit).
(Any differences I don't mention here, I'm happy to drop in favour of
upstream without further discussion.)
rules/rules.d/50-udev-default.rules:
- KERNEL=="raw1394*", GROUP="video"
This will still be difficult for me to upload with ;)
- SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n"
+ SUBSYSTEM=="block", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="%k"
I still think we have this round the right way! :-)
- KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", \
- MODE="0660", OPTIONS+="last_rule"
- KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", \
- MODE="0660", OPTIONS+="last_rule"
- KERNEL=="ptmx", GROUP="tty", MODE="0666", \
- OPTIONS+="last_rule"
- KERNEL=="tty", GROUP="tty", MODE="0666", \
- OPTIONS+="last_rule"
- KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620", \
- OPTIONS+="last_rule"
- KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty", \
- OPTIONS+="last_rule"
- KERNEL=="console", MODE="0600", OPTIONS+="last_rule"
+ KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", \
+ MODE="0660",
+ KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", \
+ MODE="0660",
+ KERNEL=="ptmx", GROUP="tty", MODE="0666"
+ KERNEL=="tty", GROUP="tty", MODE="0666"
+ KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620",
+ KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty",
+ KERNEL=="console", MODE="0600"
last_rule on these prevents us from setting the console font or keymap
from udev rules, and prevents us from activating console-related
things (getty, brltty, etc.) from Upstart
you said it was only there because of the legacy ptys, which we've
both disabled now?
- KERNEL=="tun", NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove"
+ KERNEL=="tun", NAME="net/%k"
The mode seems rather permissive? Do you really allow any user to
make tunnels by default? (Ours is 0600!)
Isn't the ignore_remove already handled by the /lib/udev/devices
check? Our /dev/net/tun is in there.
- KERNEL=="ppp", MODE="0600", OPTIONS+="ignore_remove"
+ KERNEL=="ppp", MODE="0600"
ignore_remove already handled by /lib/udev/devices check?
- KERNEL=="mem|kmem|port|nvram", GROUP="kmem", MODE="0640"
+ KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
+ KERNEL=="nvram", GROUP="nvram", MODE="0640"
We have the nvram group, no idea why, we just do ;)
- SUBSYSTEM=="block", GROUP="disk"
+ SUBSYSTEM=="block", ATTRS{removable}!="1", GROUP="disk"
+ SUBSYSTEM=="block", ATTRS{removable}=="1", GROUP="floppy"
We put removable block devices in the floppy group, you leave them in
disk? (But use the floppy group for real floppies?)
- KERNEL=="sg[0-9]*", ATTRS{type}!="3|6", GROUP="disk", MODE="0640"
+ SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk", MODE="0640"
+ SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom", MODE="0640"
- KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k"
+ KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k", GROUP="cdrom"
# eep, needs cdrom_id run earlier (we ran it at 30-* before)
+ ENV{ID_CDROM}=="?*", GROUP="cdrom"
We put CD-ROM drives and similar into the cdrom group, not disk.
+ SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
- KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="disk"
+ KERNEL=="ht[0-9]*|nht[0-9]*", GROUP="tape"
- KERNEL=="pt[0-9]*|npt[0-9]*", GROUP="disk"
+ KERNEL=="pt[0-9]*|npt[0-9]*", GROUP="tape"
- KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|
nrawqft[0-9]*", GROUP="disk"
+ KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|
nrawqft[0-9]*", GROUP="tape"
We put tape drives and similar into the tape group, not disk.
rules/rules.d/80-drivers.rules:
- SUBSYSTEM=="module", KERNEL=="parport_pc", \
- RUN+="/sbin/modprobe -b ppdev"
We don't have this one? What's this for? Is a module missing a
dependency?
rules/packages/40-alsa.rules:
KERNEL=="mixer0", SYMLINK+="mixer"
KERNEL=="dsp0", SYMLINK+="dsp"
KERNEL=="audio0", SYMLINK+="audio"
Which kernel module/ALSA version creates these? Here I can only
see /dev/mixer, /dev/dsp and /dev/audio as devices in their own
right. Does a later ALSA version enumerate them, or were these added
just in case?
+ SUBSYSTEM=="sound", GROUP="audio"
And we have an "audio" group for them.
rules/packages/40-isdn.rules:
- SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", \
- SYMLINK+="isdn/capi20", GROUP="uucp"
+ SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", \
+ GROUP="uucp"
What uses the /dev/isdn/capi20 symlink? We've never had that, and
I've never had any bug reports.
We have a "dialout" group, which we seem to use everywhere you use
"uucp". I think that we inherited this from Debian: Marco, do these
differences match your rules?
It may make sense for these to be a Debian/Ubuntu diff, or a configure
argument?
rules/rules.d/50-udev-default.rules:
- KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="uucp"
+ KERNEL=="tty[A-Z]*|pppox*|ircomm*|noz*", GROUP="dialout"
- KERNEL=="mwave", NAME="modems/mwave", GROUP="uucp"
+ KERNEL=="mwave", NAME="modems/mwave", GROUP="dialout"
- KERNEL=="hvc*|hvsi*", GROUP="uucp"
+ KERNEL=="hvc*|hvsi*", GROUP="dialout"
+ SUBSYSTEM=="slamr", GROUP="dialout"
+ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
+ ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", \
+ MODE="0660", GROUP="dialout"
rules/packages/40-isdn.rules:
- SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", \
- SYMLINK+="isdn/capi20", GROUP="uucp"
+ SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", \
+ SYMLINK+="isdn/capi20", GROUP="dialout"
rules/packages/40-zaptel.rules:
+ SUBSYSTEM=="zaptel", GROUP="dialout"
(or just the GROUP= tagged onto the other rules for consistency)
Scott
--
Scott James Remnant
scott@ubuntu.com
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2008-12-22 14:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-22 14:20 Scott James Remnant [this message]
2008-12-22 15:30 ` Moving Ubuntu to upstream udev rules (Part 2) Kay Sievers
2008-12-22 15:42 ` Bernhard Walle
2008-12-22 15:55 ` Kay Sievers
2008-12-22 16:02 ` Scott James Remnant
2008-12-22 16:12 ` Kay Sievers
2008-12-22 16:15 ` Marco d'Itri
2008-12-22 16:30 ` Kay Sievers
2008-12-22 16:40 ` Marco d'Itri
2008-12-22 16:52 ` Kay Sievers
2008-12-22 19:57 ` Piter PUNK
2008-12-22 20:25 ` Marco d'Itri
2008-12-24 15:28 ` Kay Sievers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1229955629.6944.63.camel@quest \
--to=scott@ubuntu.com \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).