From: Harald Hoyer Date: Mon, 14 Sep 2009 13:53:55 +0000 (+0200) Subject: dracut-functions: fixed inst() for mkinitrd compat X-Git-Tag: 002~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9541165d33b7c3724160fcf6e41fb5e63fe1ab9f;p=thirdparty%2Fdracut.git dracut-functions: fixed inst() for mkinitrd compat --- diff --git a/dracut-functions b/dracut-functions index acc9da909..65cd4cb1f 100755 --- a/dracut-functions +++ b/dracut-functions @@ -264,7 +264,11 @@ inst() { derror "inst only takes 1 or 2 or 3 arguments" exit 1 fi - [[ "$2" = "$initdir" ]] && set $1 $3 + if [[ $# = 3 ]]; then + [[ -z $initdir ]] && initdir=$2; + export initdir + set $1 $3 + fi for x in inst_symlink inst_script inst_binary inst_simple; do $x "$@" && return 0 done