summaryrefslogtreecommitdiffstats
path: root/src/cmd/install.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/install.sh
parentb8f8662d9b895cd32b05d755d2b33997ecdb6ffb (diff)
cmd/install*: Check return value of install_system()
Also clean up on error.
Diffstat (limited to 'src/cmd/install.sh')
-rw-r--r--src/cmd/install.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cmd/install.sh b/src/cmd/install.sh
index 8d75e2c..d32f488 100644
--- a/src/cmd/install.sh
+++ b/src/cmd/install.sh
@@ -69,9 +69,12 @@ cmd_install_main()
fi
fi
- install_system "${cmd_install_opt_m-}" "${suite}" \
- "${cmd_install_opt_a-}" "${cmd_install_opt_p-}" \
- "${root}" "${foreign}"
+ if ! install_system "${cmd_install_opt_m-}" "${suite}" \
+ "${cmd_install_opt_a-}" "${cmd_install_opt_p-}" \
+ "${root}" "${foreign}"; then
+ [ "x${dev}" != 'x' ] && block_umount "${root}"
+ return 1
+ fi
[ "x${dev}" != 'x' ] && block_umount "${root}"