From: Harald Hoyer Date: Sat, 30 Jun 2012 10:46:55 +0000 (+0200) Subject: dracut-functions.sh: create $initdir, if it does not exist X-Git-Tag: 021~88 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eaa924b69ed10c49ab99ed2f064337dff1ce41b7;p=thirdparty%2Fdracut.git dracut-functions.sh: create $initdir, if it does not exist --- diff --git a/dracut-functions.sh b/dracut-functions.sh index 80b022f1e..eabbb0deb 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* ]]; }