From: Harald Hoyer Date: Wed, 27 Jun 2012 12:18:21 +0000 (+0200) Subject: dracut-functions.sh: error out, if $initdir is not set X-Git-Tag: 020~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ec1aa3bc486e9c3f061a9ee3faf85c637a9ca4f5;p=thirdparty%2Fdracut.git dracut-functions.sh: error out, if $initdir is not set --- diff --git a/dracut-functions.sh b/dracut-functions.sh index 2c32e8dfb..7ec20cb33 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -20,6 +20,10 @@ # along with this program. If not, see . # +[[ $initdir ]] || { echo "ERROR: initdir $initdir not set" 2>&1; exit 10; } +[[ -d $initdir ]] || mkdir -p $initdir +export initdir + # Generic substring function. If $2 is in $1, return 0. strstr() { [[ $1 = *$2* ]]; }