Systemd/test/label_test
kay.sievers@vrfy.org d94df23242 [PATCH] don't rely on field order in namedev_parse
o change the parsing to get a key from the rule and sort it
    into our list of known keys instead of expecting a special order
  o the key to match a sysfs file must be prependend by 'SYSFS_' now
    to match with the new parsing.
    (The config must be changed, but it's a bit more descriptive too.)
  o put names of fields in define's, like the name of the methods
  o update all tests and the man page
2005-04-26 21:13:08 -07:00

46 lines
659 B
Bash

#!/bin/bash
RULES=label_test.rules
CONFIG=label_test.conf
export UDEV_TEST=yes
export SYSFS_PATH=$PWD/sys/
export UDEV_CONFIG_FILE=$PWD/$CONFIG
cat > $RULES << EOF
LABEL, BUS="scsi", SYSFS_vendor="IBM-ESXS", NAME="boot_disk%n"
EOF
cat > $CONFIG << EOF
udev_root="$PWD/udev/"
udev_db="$PWD/udev/.udev.tdb"
udev_rules="$PWD/$RULES"
udev_permissions="$PWD/udev.permissions"
EOF
export ACTION=add
export DEVPATH=block/sda
../udev block
ls -l udev
export DEVPATH=block/sda/sda3
../udev block
ls -l udev
export ACTION=remove
export DEVPATH=block/sda
../udev block
ls -l udev
export DEVPATH=block/sda/sda3
../udev block
ls -l udev
rm $RULES
rm $CONFIG