IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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)
> > here is a experimental symlink creation patch - for discussion,
> > in which direction we should go.
> > It is possible now to define SYMLINK= after the NAME= in udev.rules.
> > The link is relative to the node, but the path is not optimized now
> > if the node and the link are in the same nested directory.
> > Only one link is supported, cause i need to sleep now :)
> >
> > 06-simple-symlink-creation.diff
> > simple symlink creation
> > reorganized udev-remove to have access to the symlink field
> > subdir creation/removal are functions now
> > udev-test.pl tests for link creation/removal
Here is a new version with relative link target path optimization
an better tests in udev-test.pl:
LABEL, BUS="scsi", vendor="IBM-ESXS", NAME="1/2/a/b/node", SYMLINK="1/2/c/d/symlink"
Dec 7 06:48:34 pim udev[13789]: create_node: symlink 'udev-root/1/2/c/d/symlink' to node '1/2/a/b/node' requested
Dec 7 06:48:34 pim udev[13789]: create_path: created 'udev-root/1/2/c'
Dec 7 06:48:34 pim udev[13789]: create_path: created 'udev-root/1/2/c/d'
Dec 7 06:48:34 pim udev[13789]: create_node: symlink(../../a/b/node, udev-root/1/2/c/d/symlink)
As promised yesterday, here is a patch to implement a more advanced
pattern matching instead of the simple '*'.
We can remove the "tty"="tty" line from udev.rules now and
replace "tty*" by "tty[0-9]*" to catch only the vc's.
implement pattern matching in namedev
'*' - to match zero or more chars
'?' - to match exactly one char
'[]' - character classes with ranges '[0-9]'and negation [!A]