dracut-functions: fixed inst() for mkinitrd compat

master
Harald Hoyer 2009-09-14 15:53:55 +02:00
parent 600131fe85
commit 9541165d33
1 changed files with 5 additions and 1 deletions

View File

@ -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