dracut-functions.sh: create $initdir, if it does not exist
authorHarald Hoyer <harald@redhat.com>
Sat, 30 Jun 2012 10:46:55 +0000 (12:46 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 2 Jul 2012 16:52:49 +0000 (18:52 +0200)
dracut-functions.sh

index 80b022f..eabbb0d 100755 (executable)
@@ -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* ]]; }