summaryrefslogtreecommitdiff
path: root/osi-mk
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-08-12 23:36:53 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-08-12 23:53:58 -0400
commit8d28968d713e8cad1aef79e293a6413b24c3a88b (patch)
treebcfa590cd142951b1b1fdea7e9710bd37a01cfcb /osi-mk
parentf46ece4a582120582c785389139c2066b7540bd4 (diff)
osi-mount: rewrite
- Add real option parsing - Split in to 2 distinct --root/--user modes - Ensure we umount before exiting. Otherwise there might be a delay between us exiting and the umount happening when the mount namespace gets GC'd.
Diffstat (limited to 'osi-mk')
-rwxr-xr-xosi-mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/osi-mk b/osi-mk
index c583276..80ff0bb 100755
--- a/osi-mk
+++ b/osi-mk
@@ -172,7 +172,7 @@ main() {
arg_mountpoint=$(mktemp -dt -- "${0##*/}.XXXXXXXXXX")
# shellcheck disable=SC2064
trap "rmdir -- ${arg_mountpoint@Q}" EXIT
- sudo -- ./osi-mount "$arg_file" "$arg_mountpoint" "${BASH_SOURCE[0]}" --inside="$arg_mountpoint" "${args[@]}"
+ sudo -- ./osi-mount --root -- "$arg_file" "$arg_mountpoint" "${BASH_SOURCE[0]}" --inside="$arg_mountpoint" "${args[@]}"
;;
inside) # just keep reading...
needs_sudo