summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-01-17 12:17:53 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-01-17 12:17:53 (EST)
commitc40a12488b8e9e929d8b2aa2ad52904867f8c278 (patch)
tree1dabd3fefaccf3d8a69606353a9b519d4aaae9bf /src
parent6c35a8ea3f43974f911af84680aaa118a9a711e0 (diff)
cmd/*: Check return value of block_mount()
Diffstat (limited to 'src')
-rw-r--r--src/cmd/build.sh4
-rw-r--r--src/cmd/install.sh4
-rw-r--r--src/cmd/installer-pc.sh4
-rw-r--r--src/cmd/mkinitramfs.sh4
-rw-r--r--src/cmd/opkg.sh4
-rw-r--r--src/cmd/shell.sh4
6 files changed, 18 insertions, 6 deletions
diff --git a/src/cmd/build.sh b/src/cmd/build.sh
index d12edfb..19350c3 100644
--- a/src/cmd/build.sh
+++ b/src/cmd/build.sh
@@ -43,7 +43,9 @@ cmd_build_main()
dev=''
if is_block "${root}"; then
dev="${root}"
- root="$(block_mount "${dev}")"
+ if ! root="$(block_mount "${dev}")"; then
+ return 2
+ fi
fi
cmd_build_root="${root}"
diff --git a/src/cmd/install.sh b/src/cmd/install.sh
index c96f014..38310b0 100644
--- a/src/cmd/install.sh
+++ b/src/cmd/install.sh
@@ -64,7 +64,9 @@ cmd_install_main()
dev=''
if is_block "${root}"; then
dev="${root}"
- root="$(block_mount "${dev}")"
+ if ! root="$(block_mount "${dev}")"; then
+ return 2
+ fi
fi
install_system "${cmd_install_opt_m-}" "${suite}" \
diff --git a/src/cmd/installer-pc.sh b/src/cmd/installer-pc.sh
index b513f26..0a87b88 100644
--- a/src/cmd/installer-pc.sh
+++ b/src/cmd/installer-pc.sh
@@ -68,7 +68,9 @@ cmd_installer_pc_main()
suite="$(profile_normalize_suite "${suite}")"
cmd_installer_pc_make_partition_and_fs "${dev}"
- root="$(block_mount "${dev}1")"
+ if ! root="$(block_mount "${dev}1")"; then
+ return 2
+ fi
install_system "${cmd_installer_pc_opt_m-}" "${suite}" \
"${cmd_installer_pc_opt_a-}" "${cmd_installer_pc_opt_p-}" \
diff --git a/src/cmd/mkinitramfs.sh b/src/cmd/mkinitramfs.sh
index e888548..52689a8 100644
--- a/src/cmd/mkinitramfs.sh
+++ b/src/cmd/mkinitramfs.sh
@@ -54,7 +54,9 @@ cmd_mkinitramfs_main()
dev=''
if is_block "${root}"; then
dev="${root}"
- root="$(block_mount "${dev}")"
+ if ! root="$(block_mount "${dev}")"; then
+ return 2
+ fi
fi
if ! profile_detect "${root}"; then
diff --git a/src/cmd/opkg.sh b/src/cmd/opkg.sh
index cb592c9..93ab7aa 100644
--- a/src/cmd/opkg.sh
+++ b/src/cmd/opkg.sh
@@ -40,7 +40,9 @@ cmd_opkg_main()
dev=''
if is_block "${root}"; then
dev="${root}"
- root="$(block_mount "${dev}")"
+ if ! root="$(block_mount "${dev}")"; then
+ return 2
+ fi
fi
first_arg=true
diff --git a/src/cmd/shell.sh b/src/cmd/shell.sh
index d964ec5..5da84e4 100644
--- a/src/cmd/shell.sh
+++ b/src/cmd/shell.sh
@@ -34,7 +34,9 @@ cmd_shell_main()
dev=''
if is_block "${root}"; then
dev="${root}"
- root="$(block_mount "${dev}")"
+ if ! root="$(block_mount "${dev}")"; then
+ return 2
+ fi
fi
if ! profile_detect "${root}"; then