* [udev] experimental CALLOUT script for devfs ide node creation with cd, disc, part
@ 2003-12-20 4:36 Kay Sievers
0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2003-12-20 4:36 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]
Here is a experimental CALLOUT script for udev to create devfs nodes
for IDE-devices. Not that I need these, I just wanted to see if it works :)
The script is really stupid, no error handling, nothing more than
absolutely needed. The rule uses the 'k' format char of the previous
patch. The %D is not used, so the user can have disc or disk :)
this single line:
CALLOUT, BUS="ide", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", ID="hd*", NAME="%1c", SYMLINK="%2c"
creates the following on my machine with two hard disks, one DVD and a PCMCIA-compact-flash inserted:
/udev
|-- hda
|-- hda1
|-- hda2
|-- hda4
|-- hdb
|-- hdb1
|-- hdc
|-- hde
|-- hde1
`-- ide
|-- host0
| |-- bus0
| | |-- target0
| | | `-- lun0
| | | |-- disc -> ../../../../../hda
| | | |-- part1 -> ../../../../../hda1
| | | |-- part2 -> ../../../../../hda2
| | | `-- part4 -> ../../../../../hda4
| | `-- target1
| | `-- lun0
| | |-- disc -> ../../../../../hdb
| | `-- part1 -> ../../../../../hdb1
| `-- bus1
| `-- target0
| `-- lun0
| `-- cd -> ../../../../../hdc
`-- host2
`-- bus0
`-- target0
`-- lun0
|-- disc -> ../../../../../hde
`-- part1 -> ../../../../../hde1
have fun,
Kay
[-- Attachment #2: ide-devfs.sh --]
[-- Type: application/x-sh, Size: 620 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [udev] experimental CALLOUT script for devfs ide node creation with cd, disc, part
@ 2003-12-22 20:35 Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2003-12-22 20:35 UTC (permalink / raw)
To: linux-hotplug
On Sat, Dec 20, 2003 at 05:36:08AM +0100, Kay Sievers wrote:
>
> Here is a experimental CALLOUT script for udev to create devfs nodes
> for IDE-devices. Not that I need these, I just wanted to see if it works :)
Very nice. I've added this in the extras/ subdirectory in the udev
tree. If that's a problem, please let me know.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-12-22 20:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-22 20:35 [udev] experimental CALLOUT script for devfs ide node creation with cd, disc, part Greg KH
-- strict thread matches above, loose matches on Subject: below --
2003-12-20 4:36 Kay Sievers
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).