devpath => "block/sda",
expected => "boot_disk" ,
conf => <<EOF
-BUS="scsi", SYSFS_vendor="IBM-ESXS", NAME="boot_disk%n"
+BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME="boot_disk%n"
KERNEL="ttyUSB0", NAME="visor"
EOF
},
devpath => "block/sda/sda1",
expected => "boot_disk1" ,
conf => <<EOF
-BUS="scsi", SYSFS_vendor="IBM-ESXS", NAME="boot_disk%n"
+BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME="boot_disk%n"
EOF
},
{
devpath => "block/sda/sda1",
expected => "boot_disk1" ,
conf => <<EOF
-BUS="scsi", SYSFS_vendor="?IBM-ESXS", NAME="boot_disk%n-1"
-BUS="scsi", SYSFS_vendor="IBM-ESXS?", NAME="boot_disk%n-2"
-BUS="scsi", SYSFS_vendor="IBM-ES??", NAME="boot_disk%n"
-BUS="scsi", SYSFS_vendor="IBM-ESXSS", NAME="boot_disk%n-3"
+BUS="scsi", SYSFS{vendor}="?IBM-ESXS", NAME="boot_disk%n-1"
+BUS="scsi", SYSFS{vendor}="IBM-ESXS?", NAME="boot_disk%n-2"
+BUS="scsi", SYSFS{vendor}="IBM-ES??", NAME="boot_disk%n"
+BUS="scsi", SYSFS{vendor}="IBM-ESXSS", NAME="boot_disk%n-3"
EOF
},
{
devpath => "block/sda/sda1",
expected => "boot_disk1" ,
conf => <<EOF
-BUS="scsi", SYSFS_vendor="IBM-ESXS", SYSFS_model="ST336605LW !#", NAME="boot_diskX%n"
-BUS="scsi", SYSFS_vendor="IBM-ESXS", SYSFS_model="ST336605LW !#", NAME="boot_disk%n"
+BUS="scsi", SYSFS{vendor}="IBM-ESXS", SYSFS{model}="ST336605LW !#", NAME="boot_diskX%n"
+BUS="scsi", SYSFS{vendor}="IBM-ESXS", SYSFS{model}="ST336605LW !#", NAME="boot_disk%n"
EOF
},
{
devpath => "block/sda/sda1",
expected => "boot_disk1" ,
conf => <<EOF
-BUS="scsi", SYSFS_vendor="IBM-ESXS", SYSFS_model="ST336605LW !#", SYSFS_scsi_level="4", SYSFS_rev="B245", SYSFS_type="2", SYSFS_queue_depth="32", NAME="boot_diskXX%n"
-BUS="scsi", SYSFS_vendor="IBM-ESXS", SYSFS_model="ST336605LW !#", SYSFS_scsi_level="4", SYSFS_rev="B245", SYSFS_type="0", NAME="boot_disk%n"
+BUS="scsi", SYSFS{vendor}="IBM-ESXS", SYSFS{model}="ST336605LW !#", SYSFS{scsi_level}="4", SYSFS{rev}="B245", SYSFS{type}="2", SYSFS{queue_depth}="32", NAME="boot_diskXX%n"
+BUS="scsi", SYSFS{vendor}="IBM-ESXS", SYSFS{model}="ST336605LW !#", SYSFS{scsi_level}="4", SYSFS{rev}="B245", SYSFS{type}="0", NAME="boot_disk%n"
EOF
},
{
devpath => "block/sda",
expected => "disk-IBM-ESXS-sda" ,
conf => <<EOF
-BUS="scsi", SYSFS_vendor="IBM-ESXS", NAME="disk-%s{vendor}-%k"
+BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME="disk-%s{vendor}-%k"
KERNEL="ttyUSB0", NAME="visor"
EOF
},
devpath => "class/tty/console",
expected => "TTY" ,
conf => <<EOF
-BUS="foo", SYSFS_dev="5:1", NAME="foo"
+BUS="foo", SYSFS{dev}="5:1", NAME="foo"
KERNEL="console", NAME="TTY"
EOF
},
devpath => "class/tty/console",
expected => "foo" ,
conf => <<EOF
-SYSFS_dev="5:1", NAME="foo"
+SYSFS{dev}="5:1", NAME="foo"
KERNEL="console", NAME="TTY"
EOF
},
devpath => "block/sda/sda2",
expected => "1/2/a/b/symlink" ,
conf => <<EOF
-BUS="scsi", SYSFS_vendor="IBM-ESXS", NAME="1/2/node", SYMLINK="1/2/a/b/symlink"
+BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME="1/2/node", SYMLINK="1/2/a/b/symlink"
EOF
},
{
devpath => "block/sda/sda2",
expected => "1/2/symlink" ,
conf => <<EOF
-BUS="scsi", SYSFS_vendor="IBM-ESXS", NAME="1/2/a/b/node", SYMLINK="1/2/symlink"
+BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME="1/2/a/b/node", SYMLINK="1/2/symlink"
EOF
},
{
devpath => "block/sda/sda2",
expected => "1/2/c/d/symlink" ,
conf => <<EOF
-BUS="scsi", SYSFS_vendor="IBM-ESXS", NAME="1/2/a/b/node", SYMLINK="1/2/c/d/symlink"
+BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME="1/2/a/b/node", SYMLINK="1/2/c/d/symlink"
EOF
},
{
devpath => "block/sda",
expected => "boot_disk15" ,
conf => <<EOF
-BUS="scsi", SYSFS_vendor="IBM-ESXS", NAME{all_partitions}="boot_disk"
+BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME{all_partitions}="boot_disk"
EOF
},
{
devpath => "class/tty/ttyUSB0",
expected => "visor" ,
conf => <<EOF
-SYSFS_idProduct="2008", NAME="visor"
+SYSFS{idProduct}="2008", NAME="visor"
EOF
},
{
.B PLACE
Match the topological position on bus, like physical port of USB device
.TP
-.BI SYSFS_ filename
+.BI SYSFS{ filename }
Match sysfs device attribute like label, vendor, USB serial number, SCSI UUID
or file system label. Up to 5 different sysfs files can be checked, with
all of the values being required in order to match the rule.
.B PROGRAM
call.
.P
+The
+.B NAME
+field given with the attribute
+.BR NAME{ all_partitions }
+will create all 15 partitions of a blockdevice.
+This may be useful for removable media devices.
+.P
.RB "The " NAME " ," SYMLINK " and " PROGRAM
fields support simple printf-like string substitution:
.TP
BUS="scsi", PROGRAM="/sbin/scsi_id", RESULT="OEM 0815", NAME="disk1"
# USB printer to be called lp_color
-BUS="usb", SYSFS_serial="W09090207101241330", NAME="lp_color"
+BUS="usb", SYSFS{serial}="W09090207101241330", NAME="lp_color"
# SCSI disk with a specific vendor and model number is to be called boot
-BUS="scsi", SYSFS_vendor="IBM", SYSFS_model="ST336", NAME="boot%n"
+BUS="scsi", SYSFS{vendor}="IBM", SYSFS{model}="ST336", NAME="boot%n"
# sound card with PCI bus id 00:0b.0 to be called dsp
BUS="pci", ID="00:0b.0", NAME="dsp"
KERNEL="ttyUSB1", NAME="pda", SYMLINK="palmtop handheld"
# multiple USB webcams with symlinks to be called webcam0, webcam1, ...
-BUS="usb", SYSFS_model="XV3", NAME="video%n", SYMLINK="webcam%n"
+BUS="usb", SYSFS{model}="XV3", NAME="video%n", SYMLINK="webcam%n"
.fi
.P
Permissions and ownership for the created device files may specified at