Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare-for-current-kernel.sh incorrect patch detection #58

Open
nalim opened this issue Jan 30, 2024 · 2 comments
Open

prepare-for-current-kernel.sh incorrect patch detection #58

nalim opened this issue Jan 30, 2024 · 2 comments

Comments

@nalim
Copy link

nalim commented Jan 30, 2024

Detection of kernel patch is broken after the last update of prepare-for-current-kernel.sh. There is no kernel 6.19 yet, so all current kernels (like 6.6) are patched by the old patch6.0, not by the newer patch6.2.

elif { echo $VERSION ; echo "6.19" ; } | sort -V -c 2>/dev/null
then
PATCHFILE="patch6.0"
else
PATCHFILE="patch6.2"
fi

@nalim
Copy link
Author

nalim commented Jan 30, 2024

maybe this?

diff --git a/prepare-for-current-kernel.sh b/prepare-for-current-kernel.sh
index 4e8d828..f1eed2b 100755
--- a/prepare-for-current-kernel.sh
+++ b/prepare-for-current-kernel.sh
@@ -1,5 +1,6 @@
 #!/bin/sh
 VERSION=`uname -r | grep -o '^[0-9]\+\.[0-9]\+'`
+VERSION2=`uname -r | grep -o '^[0-9]\+\.[0-9]\+\.[0-9]'`
 
 if { echo $VERSION ; echo "5.7" ; } | sort -V -c 2>/dev/null
 then
@@ -7,7 +8,7 @@ then
 elif { echo $VERSION ; echo "5.99" ; } | sort -V -c 2>/dev/null
 then
   PATCHFILE="patch5.8"
-elif { echo $VERSION ; echo "6.19" ; } | sort -V -c 2>/dev/null
+elif { echo $VERSION2 ; echo "6.0.19" ; } | sort -V -c 2>/dev/null
 then
   PATCHFILE="patch6.0"
 else

@joyfulcat
Copy link

Have you solved this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants