From 0e6dc5a4e292a3acaeebfd3d5b6efa9706a2a17e Mon Sep 17 00:00:00 2001 From: Stephan Wendel Date: Tue, 23 May 2023 14:28:20 +0200 Subject: [PATCH] fix: fix udev for version 'rp1+deb11u2' This is needed to also patch if version is from raspberry which is named '247.3-7+rpi1+deb11u2' Signed-off-by: Stephan Wendel --- patches/Readme.md | 4 ++-- patches/udev-fix.sh | 2 +- src/modules/udev_fix/start_chroot_script | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/patches/Readme.md b/patches/Readme.md index e79ae216a..b50cda1d8 100644 --- a/patches/Readme.md +++ b/patches/Readme.md @@ -10,7 +10,7 @@ _**DO NOT RUN THIS ON LATER VERSIONS!!!**_ ### Usage: -`curl -sSL https://raw.githubusercontent.com/mainsail-crew/MainsailOS/develop/patches/patch.sh | bash` +`curl -sSL https://raw.githubusercontent.com/mainsail-crew/MainsailOS/develop/patches/patch101.sh | bash` This will ask you for sudo password! @@ -18,7 +18,7 @@ In most cases a reboot is required! ## udev-fix.sh -This is intended to patch udev rules which has a Bug in udev package (version: 247.3-7+deb11u2). +This is intended to patch udev rules which has a Bug in udev package (version: 247.3-7+deb11u2 or 247.3-7+rpi1+deb11u2). Which does not create `/dev/serial/by-id` symlinks for your MCU.\ For further details see: diff --git a/patches/udev-fix.sh b/patches/udev-fix.sh index 462be9b15..01c1cb56b 100755 --- a/patches/udev-fix.sh +++ b/patches/udev-fix.sh @@ -74,7 +74,7 @@ print_footer(){ # Patch Funcs patch_udev(){ - if [[ -n "${UDEV_PKG_VERSION}" ]] && [[ "${UDEV_PKG_VERSION}" = "247.3-7+deb11u2" ]]; then + if [[ -n "${UDEV_PKG_VERSION}" ]] && [[ "${UDEV_PKG_VERSION}" =~ "deb11u2" ]]; then echo_red "'udev' version: ${UDEV_PKG_VERSION}, is affected by bug ..." echo_green "Install patched udev rule from systemd git repository ..." curl -sSL "${UDEV_FIX_RAW_RULE_FILE}" > "${UDEV_FIX_TMP_FILE}" diff --git a/src/modules/udev_fix/start_chroot_script b/src/modules/udev_fix/start_chroot_script index d1e141ef1..83e762581 100644 --- a/src/modules/udev_fix/start_chroot_script +++ b/src/modules/udev_fix/start_chroot_script @@ -38,7 +38,7 @@ fi # Step 2: Fix broken udev (remove after debian releases patch) UDEV_PKG_VERSION="$(dpkg-query -s udev | grep "Version" | sed 's/Version\: //')" -if [[ -n "${UDEV_PKG_VERSION}" ]] && [[ "${UDEV_PKG_VERSION}" = "247.3-7+deb11u2" ]]; then +if [[ -n "${UDEV_PKG_VERSION}" ]] && [[ "${UDEV_PKG_VERSION}" =~ "deb11u2" ]]; then echo_red "'udev' version: ${UDEV_PKG_VERSION}, is affected by bug ..." echo_green "Install patched udev rule from systemd git repository ..." curl -sSL "${UDEV_FIX_RAW_RULE_FILE}" > "${UDEV_FIX_OUTPUT_FILE}"