summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--locale/en_US.sh2
-rw-r--r--src/cmd/installer-pc.sh11
3 files changed, 12 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 9e19e63..ca1b39d 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,8 @@ New features:
packages marked "Essential: yes" and their dependencies were
installed, which was a long-standing misuse of the "Essential"
field.
+ * "prokit installer-pc" now supports foreign installations using an
+ "-F" option.
Error handling and bug fixes:
diff --git a/locale/en_US.sh b/locale/en_US.sh
index 9897086..60772c2 100644
--- a/locale/en_US.sh
+++ b/locale/en_US.sh
@@ -105,7 +105,7 @@ msg_prokit_cmd_build_not_a_dir='Not a directory: %s'
# src/cmd/installer-pc.sh
msg_prokit_cmd_installer_pc_summary='install a PC system onto a block device'
-msg_prokit_cmd_installer_pc_usage='-a <arch> -p <plat> [-m <mirror>] '\
+msg_prokit_cmd_installer_pc_usage='-a <arch> -p <plat> [-m <mirror>] [-F] '\
'<suite> <device>'
msg_prokit_cmd_installer_pc_dd='Clearing MBR and partition table...'
msg_prokit_cmd_installer_pc_dd_fail='Failed to clear MBR and partition table'
diff --git a/src/cmd/installer-pc.sh b/src/cmd/installer-pc.sh
index d85558b..fc58331 100644
--- a/src/cmd/installer-pc.sh
+++ b/src/cmd/installer-pc.sh
@@ -18,7 +18,7 @@
# along with the ProteanOS Development Kit. If not, see
# <http://www.gnu.org/licenses/>.
-cmd_installer_pc_optstring='a:p:m:'
+cmd_installer_pc_optstring='a:p:m:F'
_cmd_installer_pc_log_print()
{
@@ -76,6 +76,7 @@ _cmd_installer_pc_make_partition_and_fs()
cmd_installer_pc_main()
{
+ local foreign=
local suite=
local dev=
local profile=
@@ -104,6 +105,12 @@ cmd_installer_pc_main()
return 1
fi
+ if [ "x${cmd_installer_pc_opt_F+set}" = 'xset' ]; then
+ foreign=true
+ else
+ foreign=false
+ fi
+
suite="${1}"
dev="${2}"
shift 2
@@ -133,7 +140,7 @@ cmd_installer_pc_main()
if ! install_system "${cmd_installer_pc_opt_m-}" "${suite}" \
"${cmd_installer_pc_opt_a-}" \
"${cmd_installer_pc_opt_p-}" \
- "${root}" false; then
+ "${root}" "${foreign}"; then
block_umount "${root}"
return 2
fi