summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2021-01-16 09:31:33 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2021-01-16 09:31:33 (EST)
commit483cf90baa5986fd80845b53bbdb7904089ddb03 (patch)
tree4c763eec04772873cda96e6b2259cfb601f5a821
parent1e47af06bd4baf9294a792c9c2df518a3ad7e74b (diff)
Revert "install_system(): Move dir check to installer"
This reverts commit 4ea1459ebbc51e19f7e7e9985db450e521c54681.
-rw-r--r--locale/C.sh4
-rw-r--r--src/install.sh4
-rw-r--r--src/installer/chroot.sh5
3 files changed, 5 insertions, 8 deletions
diff --git a/locale/C.sh b/locale/C.sh
index 6d75256..ee4e237 100644
--- a/locale/C.sh
+++ b/locale/C.sh
@@ -118,9 +118,6 @@ msg_prokit_install_selected_arch='Using architecture %s'
msg_prokit_install_selected_plat='Using platform %s'
msg_prokit_install_selected_mirror='Using mirror %s'
-# src/installer/chroot.sh
-msg_prokit_installer_chroot_dir_exists='Directory "%s" exists'
-
# src/installer/pc.sh
msg_prokit_installer_pc_dd='Clearing MBR and partition table...'
msg_prokit_installer_pc_dd_fail='Failed to clear MBR and partition table'
@@ -131,6 +128,7 @@ msg_prokit_installer_pc_mkfs_fail='Failed to create file system'
# src/install.sh
msg_prokit_install_setting_up_chroot='Setting up root...'
+msg_prokit_install_chroot_dir_exists='Directory "%s" exists'
msg_prokit_install_mkdir_chroot_fail='Failed to create directory "%s"'
msg_prokit_install_find_pkgs='Configuring opkg and retrieving Packages '\
'files...'
diff --git a/src/install.sh b/src/install.sh
index a1deaf9..54d474f 100644
--- a/src/install.sh
+++ b/src/install.sh
@@ -325,6 +325,10 @@ 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 f4d10a1..dcdadb4 100644
--- a/src/installer/chroot.sh
+++ b/src/installer/chroot.sh
@@ -26,11 +26,6 @@ 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
}