summaryrefslogtreecommitdiffstats
path: root/src/cmd/opkg.sh
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/cmd/opkg.sh
parent6c35a8ea3f43974f911af84680aaa118a9a711e0 (diff)
cmd/*: Check return value of block_mount()
Diffstat (limited to 'src/cmd/opkg.sh')
-rw-r--r--src/cmd/opkg.sh4
1 files changed, 3 insertions, 1 deletions
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