diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2003-12-10 00:47:00 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:13:07 -0700 |
commit | 4763256c65859b94ac7a309cbb8f772d5426a08d (patch) | |
tree | 60c1857fd2891bb7fde065895ac10bae805b4dc5 /test/udev-test.pl | |
parent | 10a479f5e6df7010a47f1edfab8173de85a34d0d (diff) |
[PATCH] allow multiple symlinks
Here is a patch to allow the creation of multiple symlinks.
The names must be separated by a space character.
REPLACE, KERNEL="ttyUSB0", NAME="visor", SYMLINK="first-%n second-%n third-%n"
results in:
Dec 9 05:28:51 pim udev[12019]: create_node: mknod(udev-root/visor, 020666, 188, 0)
Dec 9 05:28:51 pim udev[12019]: create_node: symlink 'udev-root/first-0' to node 'visor' requested
Dec 9 05:28:51 pim udev[12019]: create_node: symlink(./visor, udev-root/first-0)
Dec 9 05:28:51 pim udev[12019]: create_node: symlink 'udev-root/second-0' to node 'visor' requested
Dec 9 05:28:51 pim udev[12019]: create_node: symlink(./visor, udev-root/second-0)
Dec 9 05:28:51 pim udev[12019]: create_node: symlink 'udev-root/third-0' to node 'visor' requested
Dec 9 05:28:51 pim udev[12019]: create_node: symlink(./visor, udev-root/third-0)
Diffstat (limited to 'test/udev-test.pl')
-rw-r--r-- | test/udev-test.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl index 190b7ce4d6..39d8450c34 100644 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -217,6 +217,15 @@ EOF LABEL, BUS="scsi", vendor="IBM-ESXS", NAME="1/2/a/b/node", SYMLINK="1/2/c/d/symlink" EOF }, + { + desc => "multiple symlinks", + subsys => "tty", + devpath => "class/tty/ttyUSB0", + expected => "second-0" , + conf => <<EOF +REPLACE, KERNEL="ttyUSB0", NAME="visor", SYMLINK="first-%n second-%n third-%n" +EOF + }, ); # set env |