summaryrefslogtreecommitdiffstats
path: root/src/cmd/shell.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/shell.sh')
-rw-r--r--src/cmd/shell.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/shell.sh b/src/cmd/shell.sh
index 314b79b..8d5cd16 100644
--- a/src/cmd/shell.sh
+++ b/src/cmd/shell.sh
@@ -44,7 +44,10 @@ cmd_shell_main()
return 2
fi
- session_begin "${root}" . : false
+ if ! session_begin "${root}" . : false; then
+ [ "x${dev}" != 'x' ] && block_umount "${root}"
+ return 2
+ fi
if [ ${#} -eq 0 ]; then
session_exec /bin/sh
printf '\n'