From 9cc23018e24535162190ee06f0a4a91626fef9b3 Mon Sep 17 00:00:00 2001 From: yangyanchao Date: Fri, 13 Aug 2021 16:56:12 +0800 Subject: [PATCH] weak-modules: fix a bug when using weak_modules without '$' Signed-off-by: yangyanchao (cherry picked from commit 9298676ae4a6c9ff3f89657ab314a502b72c4f5c) --- kmod.spec | 7 +++++-- weak-modules | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/kmod.spec b/kmod.spec index 2ad3a3a..24a15b3 100644 --- a/kmod.spec +++ b/kmod.spec @@ -1,6 +1,6 @@ Name: kmod Version: 27 -Release: 9 +Release: 10 Summary: Kernel module management # GPLv2+ is used by programs, LGPLv2+ is used for libraries. License: GPLv2+ and LGPLv2+ @@ -110,8 +110,11 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %doc TODO NEWS README %changelog +* Fri Aug 13 2021 YangYanchao - 27-10 +- weak-modules: fix a bug when using weak_modules without '$' + * Fri Aug 13 2021 YangYanchao - 27-9 -- weak-modules: disable an error when /lib/modules/`uname -r`/weak-modules does not exist +- weak-modules: fix a bug when /lib/modules/`uname -r`/weak-update does not exist * Wed Apr 7 2021 YangYanchao - 27-8 - backport weak-modules script from fedora diff --git a/weak-modules b/weak-modules index 7ba26bb..e67e7bb 100644 --- a/weak-modules +++ b/weak-modules @@ -1078,7 +1078,7 @@ remove_kernel() { module_has_changed $weak_modules $remove_krel # Remove everything beneath the weak-updates directory - if [ -d "weak_modules" ]; then + if [ -d "$weak_modules" ]; then ( cd "$weak_modules" && doit rm -rf * ) fi } -- Gitee