diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-01-17 10:34:56 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-01-17 10:34:56 (EST) |
commit | a8e57bde8d2d9ba23a8c5fc7ddc6438c0142d33f (patch) | |
tree | f6a8a785ae52de10da5ea37e83339d3f96657659 /src/cmd/shell.sh | |
parent | 69b9e4d24a0efa73405bbe42f7e06b567bb1f60e (diff) |
cmd/*: Check return value of profile_detect()
Also clean up on error now.
Diffstat (limited to 'src/cmd/shell.sh')
-rw-r--r-- | src/cmd/shell.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/shell.sh b/src/cmd/shell.sh index 578e5d1..d964ec5 100644 --- a/src/cmd/shell.sh +++ b/src/cmd/shell.sh @@ -37,7 +37,10 @@ cmd_shell_main() root="$(block_mount "${dev}")" fi - profile_detect "${root}" + if ! profile_detect "${root}"; then + [ "x${dev}" != 'x' ] && block_umount "${root}" + return 2 + fi session_begin "${root}" . : false if [ ${#} -eq 0 ]; then |