summaryrefslogtreecommitdiff
path: root/extras/ide-devfs.sh
AgeCommit message (Collapse)Author
2005-04-26[PATCH] udev - small script optimizationkay.sievers@vrfy.org
Optimize the scripts reflecting the now more powerful rule logic, cause we can combine all known fields now in any order: The ide-devfs.sh is only executed if the kernel name matches with 'hd*': BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%1c %2c" The name_cdrom.pl is only executed for ide and scsi devices, but not for a partition. It exits with nonzero to skip the rule if the CD is not found: KERNEL="[hs]d[a-z]", PROGRAM="name_cdrom.pl %M %m", NAME="%1c", SYMLINK="cdrom"
2005-04-26[PATCH] udev - CALLOUT is PROGRAM nowkay.sievers@vrfy.org
replace CALLOUT by PROGRAM and fix old rule format
2005-04-26[PATCH] LSB init script and other stuffeike-hotplug@sf-tec.de
I had too much time during the holidays, so I played a bit with udev. The changes are like last time mostly on the init stuff. I'm sending you this as a great diff which is just for comments. What it does: -fix a typo in Makefile -use only one "grep -v" instead of many -don't include BK-Files into release (shrinks the stuff to 30%!) -add a new init script which is LSB compliant -add some flags to choose which one to use -use /etc/udev/udev.conf in Redhat init script as the source for the udev directory. If this is not done then the init script may create a directory which udev itself isn't using (I changed /udev to /Udev to avoid collisions with /usr and ran into this) -first check for sysfs_dir before creating udev_root (maybe someone else has already fixed this, I saw this discussion on lkml)
2005-04-26[PATCH] ide-devfs.sh updatekay.sievers@vrfy.org
Attached is a patch for ide-devfs.sh, The script is merged with the one from Martin Schlemmer, and cleaned up by him, to create both types of symlinks with one single rule: CALLOUT, BUS="ide", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", ID="hd*", NAME="%1c", SYMLINK="%2c %3c" /udev/ |-- cdroms | `-- cdrom0 -> ../hdc |-- discs | |-- disc0 | | |-- disc -> ../../hda | | |-- part1 -> ../../hda1 | | |-- part2 -> ../../hda2 | | `-- part4 -> ../../hda4 | |-- disc1 | | |-- disc -> ../../hdb | | `-- part1 -> ../../hdb1 | `-- disc2 | |-- disc -> ../../hde | `-- part1 -> ../../hde1 |-- 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
2005-04-26[PATCH] experimental CALLOUT script for devfs ide node creation with cd, ↵kay.sievers@vrfy.org
disc, part 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