diff --git a/dracut-functions b/dracut-functions index 2a53e11a..7e13ee58 100755 --- a/dracut-functions +++ b/dracut-functions @@ -153,12 +153,17 @@ inst_rules() { # general purpose installation function # Same args as above. inst() { - if (($# != 1 && $# != 2)); then + if (($# != 1 && $# != 2 && $# != 3)); then echo "usage: inst []" return 1 fi + local dst + [ $# = 3 ] && dst=$3 + if [ $# = 2 ]; then + [ -d "$2" ] || dst=$2 + fi for x in inst_symlink inst_script inst_binary inst_simple; do - $x "$@" && return 0 + $x $1 $dst && return 0 done return 1 }