]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions.sh: error out, if $initdir is not set
authorHarald Hoyer <harald@redhat.com>
Wed, 27 Jun 2012 12:18:21 +0000 (14:18 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 29 Jun 2012 10:41:27 +0000 (12:41 +0200)
dracut-functions.sh

index 2c32e8dfb15c0afdde763cc5370cd8ed9d8d0520..7ec20cb331182dd023db59c3b9779972f16a4579 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+[[ $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* ]]; }