diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-10-31 13:48:22 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-10-31 13:51:17 +0100 |
commit | 60775392123a0253863ab7af5accd3b61285d84e (patch) | |
tree | bcdeefa21afe7ccb1eacc3857c7cde5d7a810d5c | |
parent | 0c30c4736581df1e50bf42159b3041b3dedfa4da (diff) | |
download | vyos-1x-60775392123a0253863ab7af5accd3b61285d84e.tar.gz vyos-1x-60775392123a0253863ab7af5accd3b61285d84e.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.
(cherry picked from commit 513e951f3e1358ec6ff5424d03e8f4e9aa7c3388)
-rw-r--r-- | src/etc/udev/rules.d/90-vyos-serial.rules | 4 |
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 3f10f4924..5cca89e89 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 'D=$env{ID_PATH}; echo ${D: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 'D=$env{ID_PATH}; echo ${D: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" |