summaryrefslogtreecommitdiffstats
path: root/src/cmd/installer-pc.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-01-17 14:12:26 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-01-17 14:12:26 (EST)
commit3ab327e901495d4781860da9ca5b17989904a4ba (patch)
treeb428e8589558bdb44b0a6b64487be120eadb905e /src/cmd/installer-pc.sh
parentb8f8662d9b895cd32b05d755d2b33997ecdb6ffb (diff)
cmd/install*: Check return value of install_system()
Also clean up on error.
Diffstat (limited to 'src/cmd/installer-pc.sh')
-rw-r--r--src/cmd/installer-pc.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cmd/installer-pc.sh b/src/cmd/installer-pc.sh
index f118eae..a96a7cf 100644
--- a/src/cmd/installer-pc.sh
+++ b/src/cmd/installer-pc.sh
@@ -72,9 +72,13 @@ cmd_installer_pc_main()
return 2
fi
- install_system "${cmd_installer_pc_opt_m-}" "${suite}" \
- "${cmd_installer_pc_opt_a-}" "${cmd_installer_pc_opt_p-}" \
- "${root}" false
+ if ! install_system "${cmd_installer_pc_opt_m-}" "${suite}" \
+ "${cmd_installer_pc_opt_a-}" \
+ "${cmd_installer_pc_opt_p-}" \
+ "${root}" false; then
+ block_umount "${root}"
+ return 1
+ fi
if [ -f "${root}/sbin/lilo" ]; then
read b4 b3 b2 b1 <<-EOF