summaryrefslogtreecommitdiffstats
path: root/src/cmd/opkg.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/opkg.sh')
-rw-r--r--src/cmd/opkg.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/opkg.sh b/src/cmd/opkg.sh
index e6a304f..b99a977 100644
--- a/src/cmd/opkg.sh
+++ b/src/cmd/opkg.sh
@@ -85,7 +85,11 @@ cmd_opkg_main()
return 2
fi
- session_begin "${root}" . cmd_opkg_fini false
+ if ! session_begin "${root}" . cmd_opkg_fini false; then
+ cmd_opkg_fini
+ [ "x${dev}" != 'x' ] && block_umount "${root}"
+ return 2
+ fi
session_exec opkg "${@}"