From 9541165d33b7c3724160fcf6e41fb5e63fe1ab9f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 14 Sep 2009 15:53:55 +0200 Subject: [PATCH] dracut-functions: fixed inst() for mkinitrd compat --- dracut-functions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dracut-functions b/dracut-functions index acc9da90..65cd4cb1 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