From a8e57bde8d2d9ba23a8c5fc7ddc6438c0142d33f Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 17 Jan 2016 10:34:56 -0500 Subject: cmd/*: Check return value of profile_detect() Also clean up on error now. --- (limited to 'src/cmd/shell.sh') 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 -- cgit v0.9.1