diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-16 08:13:14 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-16 08:13:14 (EST) |
commit | 339eb773ee3d5281d34d77c1fdf0f4def731533b (patch) | |
tree | b0cb12311205c47be2dfc9e30e90bbf450bbf00e | |
parent | 49c6ccd1ade27bbb01cc146d22ea60413933c3dd (diff) |
cmd/install: Use installer backends
-rw-r--r-- | src/cmd/install.sh | 14 | ||||
-rw-r--r-- | src/install.sh | 32 |
2 files changed, 6 insertions, 40 deletions
diff --git a/src/cmd/install.sh b/src/cmd/install.sh index 2b02fec..0e4a8b9 100644 --- a/src/cmd/install.sh +++ b/src/cmd/install.sh @@ -26,7 +26,6 @@ cmd_install_main() local root= local profile= local foreign= - local dev= if ! get_options "${@}"; then print_cmd_usage 'install' >&2 @@ -60,23 +59,12 @@ cmd_install_main() foreign=false fi - dev='' - if is_block "${root}"; then - dev="${root}" - if ! root="$(block_mount "${dev}")"; then - return 2 - fi - fi - - if ! install_system "${cmd_install_opt_m-}" "${suite}" \ + if ! run_installer "${cmd_install_opt_m-}" "${suite}" \ "${cmd_install_opt_a-}" "${cmd_install_opt_p-}" \ "${root}" "${foreign}"; then - [ "x${dev}" != 'x' ] && block_umount "${root}" return 2 fi - [ "x${dev}" != 'x' ] && block_umount "${root}" - return 0 } diff --git a/src/install.sh b/src/install.sh index f96af60..54d474f 100644 --- a/src/install.sh +++ b/src/install.sh @@ -318,33 +318,11 @@ install_get_pkgs() install_system() { - local mirror="${1}" - local suite="${2}" - local arch="${3}" - local plat="${4}" - local root="${5}" - local foreign="${6}" - shift 6 - - if [ "x${arch}" = 'x' ]; then - arch="$(profile_detect_arch)" - fi - if [ "x${plat}" = 'x' ]; then - plat="$(profile_default_plat)" - fi - if [ "x${mirror}" = 'x' ]; then - mirror="$(profile_select_mirror)" - fi - profile_prepare_install "${mirror}" "${suite}" - - if ! profile_validate_archplat "${arch}" "${plat}"; then - error "$(get_msg 'install_bad_archplat')" "${arch}" "${plat}" - return 1 - fi - - info "$(get_msg 'install_selected_arch')" "${arch}" - info "$(get_msg 'install_selected_plat')" "${plat}" - info "$(get_msg 'install_selected_mirror')" "${mirror}" + local arch="${1}" + local plat="${2}" + local root="${3}" + local foreign="${4}" + shift 4 info "$(get_msg 'install_setting_up_chroot')" if [ -d "${root}" ] && ! dir_is_empty "${root}" 'lost+found'; then |