25 lines
760 B
Diff
25 lines
760 B
Diff
|
From eaa924b69ed10c49ab99ed2f064337dff1ce41b7 Mon Sep 17 00:00:00 2001
|
||
|
From: Harald Hoyer <harald@redhat.com>
|
||
|
Date: Sat, 30 Jun 2012 12:46:55 +0200
|
||
|
Subject: [PATCH] dracut-functions.sh: create $initdir, if it does not exist
|
||
|
|
||
|
---
|
||
|
dracut-functions.sh | 4 ++++
|
||
|
1 file changed, 4 insertions(+)
|
||
|
|
||
|
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||
|
index 80b022f..eabbb0d 100755
|
||
|
--- a/dracut-functions.sh
|
||
|
+++ b/dracut-functions.sh
|
||
|
@@ -28,6 +28,10 @@ if [[ $DRACUT_KERNEL_LAZY ]] && ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then
|
||
|
DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen"
|
||
|
fi
|
||
|
|
||
|
+if [[ $initdir ]] && ! [[ -d $initdir ]]; then
|
||
|
+ mkdir -p "$initdir"
|
||
|
+fi
|
||
|
+
|
||
|
# Generic substring function. If $2 is in $1, return 0.
|
||
|
strstr() { [[ $1 = *$2* ]]; }
|
||
|
|