diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-16 09:08:48 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2021-01-16 09:08:48 (EST) |
commit | 4ea1459ebbc51e19f7e7e9985db450e521c54681 (patch) | |
tree | 054e4c1ab326ceffe25516e1871f070f27fc463b /src | |
parent | 6e4e840980f3da36b995b0470d18e2e7ecd0a456 (diff) |
install_system(): Move dir check to installer
Fixes:
prokit: Using architecture i686-linux-glibc
prokit: Using platform libiquity-testbench
prokit: Using mirror http://files.proteanos.com/pub/proteanos
prokit: Clearing MBR and partition table...
prokit: Creating partition table...
prokit: Creating file system...
2 blocks
prokit: Setting up root...
prokit: Error: Directory "/tmp/prokit-2298865601/mount/block-1684450150" exists
Diffstat (limited to 'src')
-rw-r--r-- | src/install.sh | 4 | ||||
-rw-r--r-- | src/installer/chroot.sh | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/install.sh b/src/install.sh index 54d474f..a1deaf9 100644 --- a/src/install.sh +++ b/src/install.sh @@ -325,10 +325,6 @@ install_system() shift 4 info "$(get_msg 'install_setting_up_chroot')" - if [ -d "${root}" ] && ! dir_is_empty "${root}" 'lost+found'; then - error "$(get_msg 'install_chroot_dir_exists')" "${root}" - return 1 - fi if ! mkdir -p -- "${root}/.prokit" "${root}/prokit"; then error "$(get_msg 'install_mkdir_chroot_fail')" "${root}" return 1 diff --git a/src/installer/chroot.sh b/src/installer/chroot.sh index dcdadb4..f4d10a1 100644 --- a/src/installer/chroot.sh +++ b/src/installer/chroot.sh @@ -26,6 +26,11 @@ installer_chroot_main() local foreign="${4}" shift 4 + if [ -d "${root}" ] && ! dir_is_empty "${root}" 'lost+found'; then + error "$(get_msg 'installer_chroot_dir_exists')" "${root}" + return 1 + fi + install_system "${arch}" "${plat}" "${root}" "${foreign}" || return 1 return 0 } |