dracut/0027-dracut-functions.sh-check-for-.kernelmodseen-dir-bef.patch

25 lines
753 B
Diff
Raw Normal View History

From 6a2c23d12521c564a3c8bbfc349c677b0e9ac3ad Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 2 Mar 2012 12:01:49 +0100
Subject: [PATCH] dracut-functions.sh: check for .kernelmodseen dir, before
using it
---
dracut-functions.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 20fc6e1..5cf24a7 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -994,7 +994,8 @@ install_kmod_with_fw() {
fi
fi
- > "$initdir/.kernelmodseen/${1##*/}"
+ [ -d "$initdir/.kernelmodseen" ] && \
+ > "$initdir/.kernelmodseen/${1##*/}"
inst_simple "$1" "/lib/modules/$kernel/${1##*/lib/modules/$kernel/}" \
|| return $?