diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cmd/opkg.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/cmd/opkg.sh b/lib/cmd/opkg.sh index 9f0c0de..51b90dc 100644 --- a/lib/cmd/opkg.sh +++ b/lib/cmd/opkg.sh @@ -18,6 +18,7 @@ # along with the ProteanOS Development Kit. If not, see # <http://www.gnu.org/licenses/>. +use block use profile use session use rand @@ -27,6 +28,7 @@ cmd_opkg_opks= cmd_opkg_main() { local root= + local dev= local first_arg= local install_cmd= local arg= @@ -40,6 +42,12 @@ cmd_opkg_main() root="${1}" shift 1 + dev='' + if is_block "${root}"; then + dev="${root}" + root="$(block_mount "${dev}")" + fi + first_arg=true install_cmd=false cmd_opkg_opks='' @@ -84,6 +92,10 @@ cmd_opkg_main() cmd_opkg_fini session_end + + if [ "x${dev}" != 'x' ]; then + block_umount "${root}" + fi } cmd_opkg_fini() |