* cdroms lost permissions
@ 2006-01-13 20:01 Andrey Borzenkov
0 siblings, 0 replies; only message in thread
From: Andrey Borzenkov @ 2006-01-13 20:01 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1.1: Type: text/plain, Size: 561 bytes --]
Mandriva is using pam_console; CD-ROMs permissions were set by /dev/cdrom*
key; after last update removed /dev/cdrom%e (due ot deprecated status) cdrom
devices are belonged to root.
The suggested pathc creates persistent entries for CD-ROMs in /dev/cd
(actually $ID_TYPE). This allows easy matching by using /dev/cd/*/* as key.
This also clearly separates HDDs from CD-ROMs maing it easier to search for
all available CD-ROM drives or HDDs (OK, with HAL it is irrelevant, but not
every script is easy to convert to HAL interface).
-andrey
[-- Attachment #1.2: udev-use_id_type_for_persistent_link.patch --]
[-- Type: text/x-diff, Size: 1622 bytes --]
diff --git a/etc/udev/persistent-disk.rules b/etc/udev/persistent-disk.rules
index 3515bb1..852574d 100644
--- a/etc/udev/persistent-disk.rules
+++ b/etc/udev/persistent-disk.rules
@@ -12,8 +12,8 @@ BUS=="ide", DRIVER!="ide-cdrom", SYSFS{r
# by-id (hardware serial number)
KERNEL=="hd*[!0-9]", IMPORT{program}="/sbin/ata_id --export $tempnode"
-KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
-KERNEL=="hd*[0-9]", IMPORT{parent}=="ID_*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
+KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="$env{ID_TYPE}/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
+KERNEL=="hd*[0-9]", IMPORT{parent}=="ID_*", SYMLINK+="$env{ID_TYPE}/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
KERNEL=="sd*[!0-9]|sr*", SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394"
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/usb_id -x"
@@ -27,7 +27,7 @@ KERNEL=="sd*[0-9]|dasd*[0-9]", IMPORT{pa
KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
# by-path (shortest physical path)
-KERNEL=="*[!0-9]|sr*", ENV{ID_TYPE}=="?*", IMPORT{program}="/sbin/path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}"
+KERNEL=="*[!0-9]|sr*", ENV{ID_TYPE}=="?*", IMPORT{program}="/sbin/path_id %p", SYMLINK+="$env{ID_TYPE}/by-path/$env{ID_PATH}"
KERNEL=="sr*", GOTO="persistent_end"
KERNEL=="*[0-9]", IMPORT{parent}=="ID_*"
KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-13 20:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-13 20:01 cdroms lost permissions Andrey Borzenkov
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).