From: md@Linux.IT (Marco d'Itri)
To: linux-hotplug@vger.kernel.org
Subject: persistent.rules
Date: Fri, 05 Aug 2005 18:55:04 +0000 [thread overview]
Message-ID: <20050805185503.GA17751@wonderland.linux.it> (raw)
[-- Attachment #1: Type: text/plain, Size: 131 bytes --]
For the debian directory. I cleaned up the gentoo rules, it's not widely
tested but looks like it's working fine.
--
ciao,
Marco
[-- Attachment #2: persistent.rules --]
[-- Type: text/plain, Size: 1980 bytes --]
# This file contains the rules needed to create persistent device names.
# we are only interested in add actions for block devices
ACTION!="add", GOTO="no_volume_id"
SUBSYSTEM!="block", GOTO="no_volume_id"
# and we can safely ignore these kinds of devices
KERNEL=="ram*|loop*|fd*|sr*", GOTO="no_volume_id"
# skip removable ide devices, because the IDE drivers are horrible broken
BUS=="ide", SYSFS{removable}="1", GOTO="no_volume_id"
# disk id
KERNEL=="hd*[!0-9]", IMPORT="/sbin/ata_id --export $tempnode"
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_*"
KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", \
SYMLINK+="$env{ID_TYPE}/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
KERNEL=="sd*[!0-9]", SYSFS{ieee1394_id}=="*", \
IMPORT="/bin/echo -e 'ID_SERIAL=$sysfs{ieee1394_id}\nID_BUS=ieee1394\nID_TYPE=disk'"
KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="", IMPORT="/sbin/usb_id -x"
KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="", \
IMPORT="/sbin/scsi_id -g -x -a -s %p"
KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="?*", \
SYMLINK+="$env{ID_TYPE}/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="sd*[0-9]", IMPORT{parent}="ID_*"
KERNEL=="sd*[0-9]", ENV{ID_SERIAL}=="?*", \
SYMLINK+="$env{ID_TYPE}/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
# path
KERNEL=="*[!0-9]", ENV{ID_TYPE}=="?*", IMPORT="/sbin/path_id %p", \
SYMLINK+="$env{ID_TYPE}/by-path/$env{ID_PATH}"
KERNEL=="*[0-9]", IMPORT{parent}="ID_*"
KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", \
SYMLINK+="$env{ID_TYPE}/by-path/$env{ID_PATH}-part%n"
# volume label and uuid
KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="no_volume_id"
KERNEL=="*[0-9]", IMPORT="/sbin/vol_id --export $tempnode"
KERNEL=="*[0-9]", ENV{ID_FS_UUID}=="?*", \
SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
KERNEL=="*[0-9]", ENV{ID_FS_LABEL_SAFE}=="?*", \
SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
# end of processing
SUBSYSTEM=="block", LABEL="no_volume_id"
next reply other threads:[~2005-08-05 18:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-05 18:55 Marco d'Itri [this message]
2005-08-09 10:50 ` persistent.rules 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=20050805185503.GA17751@wonderland.linux.it \
--to=md@linux.it \
--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).