Browse Source

fix backwards inst() compat

master
Harald Hoyer 16 years ago
parent
commit
94dcc5b8d8
  1. 20
      dracut-functions

20
dracut-functions

@ -260,15 +260,21 @@ inst_rules() { @@ -260,15 +260,21 @@ inst_rules() {
# general purpose installation function
# Same args as above.
inst() {
if (($# != 1 && $# != 2 && $# != 3 )); then
case $# in
1) ;;
2)
[[ -z $initdir ]] && [[ -d $2 ]] && export initdir=$2
[[ $initdir = $2 ]] && set $1
;;
3)
[[ -z $initdir ]] && export initdir=$2
set $1 $3
;;
*)
derror "inst only takes 1 or 2 or 3 arguments"
exit 1
fi
if [[ $# = 3 ]]; then
[[ -z $initdir ]] && initdir=$2;
export initdir
set $1 $3
fi
;;
esac
for x in inst_symlink inst_script inst_binary inst_simple; do
$x "$@" && return 0
done

Loading…
Cancel
Save