linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] Create persistent names for tape devices and medium changers
Date: Mon, 05 Feb 2007 23:18:00 +0000	[thread overview]
Message-ID: <20070205231759.GA25027@ma.emulex.com> (raw)

This adds rules to redhat/50-udev.rules to call scsi_id for a
persistent names (symlinks) for tapes and medium changers (tape
robots).  The symlinks live under /dev/tapes/by-id.

Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
---
 etc/udev/redhat/50-udev.rules |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/etc/udev/redhat/50-udev.rules b/etc/udev/redhat/50-udev.rules
index d72cb83..ed6c661 100644
--- a/etc/udev/redhat/50-udev.rules
+++ b/etc/udev/redhat/50-udev.rules
@@ -109,6 +109,17 @@ KERNEL="nst*",			GROUP="disk", MODE="0660"
 KERNEL="osst*",		GROUP="disk", MODE="0660"
 KERNEL="nosst*",		GROUP="disk", MODE="0660"
 
+ACTION!="add", GOTO="persistent_tape_end"
+
+KERNEL="nst[0-9]*", BUS="scsi", ENV{ID_SERIAL}="", IMPORT{program}="/lib/udev/scsi_id -g -x -s %p -d $tempnode"
+KERNEL="nst[0-9]*", BUS="scsi", ENV{ID_SERIAL}="?*", SYMLINK+="tapes/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
+
+# type 8 devices are "Medium Changers"
+KERNEL="sg*", BUS="scsi", SYSFS{type}="8", ENV{ID_SERIAL}="", IMPORT{program}="/lib/udev/scsi_id -g -x -s %p -d $tempnode"
+KERNEL="sg*", BUS="scsi", SYSFS{type}="8", ENV{ID_SERIAL}="?*", SYMLINK+="tapes/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
+
+LABEL="persistent_tape_end"
+
 # diskonkey devices
 KERNEL="diskonkey*",		GROUP="disk", MODE="0640"
 
-- 
1.5.0.rc3.39.gec804

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
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:[~2007-02-05 23:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20070205231759.GA25027@ma.emulex.com \
    --to=jamie.wellnitz@emulex.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).