From 992cab683bae2aeba9f8904634205f4c1bd976aa Mon Sep 17 00:00:00 2001 From: alexarnoldy Date: Thu, 22 Aug 2024 15:19:21 -0700 Subject: [PATCH] added \| grep "Basesystem" to ensure only one software repo is returned --- sle15/nvidia-driver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sle15/nvidia-driver b/sle15/nvidia-driver index 8b999169..57c96e20 100755 --- a/sle15/nvidia-driver +++ b/sle15/nvidia-driver @@ -44,7 +44,7 @@ _resolve_kernel_version() { fi local version_without_flavor=$(echo ${KERNEL_VERSION} | cut -d- -f-2) local version=$(zypper -x se -s -t package --match-exact "kernel-devel$package_flavor" | - grep "solvable "| grep $version_without_flavor | sed -e 's/.*edition="\([^"]*\).*/\1/g;s/\(.*\)\..*/\1/') + grep "solvable "| grep $version_without_flavor | grep "Basesystem" | sed -e 's/.*edition="\([^"]*\).*/\1/g;s/\(.*\)\..*/\1/') if [ -z "${version}" ]; then echo "Could not resolve Linux kernel version" >&2