summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/block.sh4
-rw-r--r--src/cmd/installer-pc.sh4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/block.sh b/src/block.sh
index f056305..fb6b921 100644
--- a/src/block.sh
+++ b/src/block.sh
@@ -40,7 +40,9 @@ block_mount()
local dev="${1}"
local dir=
- check_block "${dev}"
+ if ! check_block "${dev}"; then
+ return 2
+ fi
rand
dir="$(get_vardata_dir 'mount')/block-$(printf '%010d' ${rand_x})"
diff --git a/src/cmd/installer-pc.sh b/src/cmd/installer-pc.sh
index 76112d2..b513f26 100644
--- a/src/cmd/installer-pc.sh
+++ b/src/cmd/installer-pc.sh
@@ -52,7 +52,9 @@ cmd_installer_pc_main()
suite="${1}"
dev="${2}"
- check_block "${dev}"
+ if ! check_block "${dev}"; then
+ return 2
+ fi
if [ "x${suite%%:*}" != "x${suite}" ]; then
profile="${suite%%:*}"