linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: persistent.rules
Date: Tue, 09 Aug 2005 10:50:28 +0000	[thread overview]
Message-ID: <20050809105028.GA11712@vrfy.org> (raw)
In-Reply-To: <20050805185503.GA17751@wonderland.linux.it>

On Fri, Aug 05, 2005 at 08:55:04PM +0200, Marco d'Itri wrote:
> For the debian directory. I cleaned up the gentoo rules, it's not widely
> tested but looks like it's working fine.

Nice, I like the skip on ACTION!="add". :)
You may want to add:
  SUBSYSTEM="block", BUS="ide", SYSFS{removable}="1", GOTO="no_volume_id"

cause removable IDE devices causes hotplug events on open()/close(),
which gives a nice infinite loop.

Kay


> # 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"


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

      reply	other threads:[~2005-08-09 10:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-05 18:55 persistent.rules Marco d'Itri
2005-08-09 10:50 ` Kay Sievers [this message]

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=20050809105028.GA11712@vrfy.org \
    --to=kay.sievers@vrfy.org \
    --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).