summaryrefslogtreecommitdiff
path: root/test/udev-test.pl
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-06-25 13:10:16 +0200
committerKay Sievers <kay.sievers@suse.de>2005-06-25 13:10:16 +0200
commitbd0ed2ffbec325512c3131ce0db896234e36c923 (patch)
treedcc939391e5e641edbca49a54534e542016b7023 /test/udev-test.pl
parent6bf0ffe8fd312c1e6549cb1721d7a7efeee77185 (diff)
IMPORT=<file> allow to import a shell-var style config-file
This allows to source-in a file into the udev environment to have the defined keys available for later processing by udev itself or the forked helper programs. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'test/udev-test.pl')
-rwxr-xr-xtest/udev-test.pl19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 9225352130..c7a99e517d 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -259,6 +259,16 @@ BUS=="scsi", ID=="0:0:0:0", NAME="M%M-m%m-n%n-b%3b-s%3s{vendor}"
EOF
},
{
+ desc => "import of shellvalue file",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "subdir/sys/node" ,
+ rules => <<EOF
+BUS=="scsi", IMPORT="test.all", NAME="subdir%E{SYSFSDIR}/node"
+KERNEL=="ttyUSB0", NAME="visor"
+EOF
+ },
+ {
desc => "sustitution of sysfs value (%s{file})",
subsys => "block",
devpath => "/block/sda",
@@ -1375,6 +1385,15 @@ KERNEL=="sda", GROUP="not-ok", MODE="0666", NAME="ok"
EOF
},
{
+ desc => "env substitution",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "node-add-me",
+ rules => <<EOF
+KERNEL=="sda", MODE="0666", NAME="node-\$env{ACTION}-me"
+EOF
+ },
+ {
desc => "reset list to current value",
subsys => "tty",
devpath => "/class/tty/ttyUSB0",