summaryrefslogtreecommitdiff
path: root/src/etc/udev/rules.d
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-10-31 13:48:22 +0100
committerChristian Poessinger <christian@poessinger.com>2021-10-31 13:48:22 +0100
commit513e951f3e1358ec6ff5424d03e8f4e9aa7c3388 (patch)
tree6f5a41916965359f5a1b24af29736208e5e62334 /src/etc/udev/rules.d
parentf227987ccf41e01d4ddafb6db7b36ecf13148c78 (diff)
downloadvyos-1x-513e951f3e1358ec6ff5424d03e8f4e9aa7c3388.tar.gz
vyos-1x-513e951f3e1358ec6ff5424d03e8f4e9aa7c3388.zip
console: udev: T3954: adjust rule script to new systemd-udev version
We can no longer use bash veriable string code vor string manipulation. Move to a more robust "cut" implementation.
Diffstat (limited to 'src/etc/udev/rules.d')
-rw-r--r--src/etc/udev/rules.d/90-vyos-serial.rules4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/etc/udev/rules.d/90-vyos-serial.rules b/src/etc/udev/rules.d/90-vyos-serial.rules
index 872fd4fea..30c1d3170 100644
--- a/src/etc/udev/rules.d/90-vyos-serial.rules
+++ b/src/etc/udev/rules.d/90-vyos-serial.rules
@@ -22,7 +22,7 @@ IMPORT{builtin}="path_id", IMPORT{builtin}="usb_id"
# (tr -d -) does the replacement
# - Replace the first group after ":" to represent the bus relation (sed -e 0,/:/s//b/) indicated by "b"
# - Replace the next group after ":" to represent the port relation (sed -e 0,/:/s//p/) indicated by "p"
-ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="", PROGRAM="/bin/sh -c 'echo $env{ID_PATH:17} | tr -d - | sed -e 0,/:/s//b/ | sed -e 0,/:/s//p/'", SYMLINK+="serial/by-bus/$result"
-ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="?*", PROGRAM="/bin/sh -c 'echo $env{ID_PATH:17} | tr -d - | sed -e 0,/:/s//b/ | sed -e 0,/:/s//p/'", SYMLINK+="serial/by-bus/$result"
+ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="", PROGRAM="/bin/sh -c 'echo $env{ID_PATH} | cut -d- -f3- | tr -d - | sed -e 0,/:/s//b/ | sed -e 0,/:/s//p/'", SYMLINK+="serial/by-bus/$result"
+ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="?*", PROGRAM="/bin/sh -c 'echo $env{ID_PATH} | cut -d- -f3- | tr -d - | sed -e 0,/:/s//b/ | sed -e 0,/:/s//p/'", SYMLINK+="serial/by-bus/$result"
LABEL="serial_end"