From: Yu Watanabe Date: Thu, 3 Nov 2022 00:52:23 +0000 (+0900) Subject: udev: add safe guard for setting by-id symlink X-Git-Tag: v253-rc1~602^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F25246%2Fhead;p=thirdparty%2Fsystemd.git udev: add safe guard for setting by-id symlink The ID_BUS property is necessary for creating by-id symlinks. --- diff --git a/rules.d/60-serial.rules b/rules.d/60-serial.rules index 2c1488e930a..a0e66323a9b 100644 --- a/rules.d/60-serial.rules +++ b/rules.d/60-serial.rules @@ -17,6 +17,7 @@ IMPORT{builtin}="path_id" ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="", SYMLINK+="serial/by-path/$env{ID_PATH}" ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-path/$env{ID_PATH}-port$env{.ID_PORT}" +ENV{ID_BUS}=="", GOTO="serial_end" ENV{ID_SERIAL}=="", GOTO="serial_end" ENV{ID_USB_INTERFACE_NUM}=="", GOTO="serial_end" ENV{.ID_PORT}=="", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}"