summaryrefslogtreecommitdiff
path: root/osi-extract
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-extract
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-extract')
-rwxr-xr-xosi-extract2
1 files changed, 1 insertions, 1 deletions
diff --git a/osi-extract b/osi-extract
index 2a1cbfa..f09f97d 100755
--- a/osi-extract
+++ b/osi-extract
@@ -11,5 +11,5 @@
mountpoint=$(mktemp -dt -- "${0##*/}.XXXXXXXXXX")
trap "rmdir -- ${mountpoint@Q}" EXIT
- sudo -- ./osi-mount "$arg_image" "$mountpoint" sudo -u "#$UID" -- cp -aT -- "$mountpoint/$arg_src" "$arg_dst"
+ sudo -- ./osi-mount --user -- "$arg_image" "$mountpoint" cp -aT -- "$mountpoint/$arg_src" "$arg_dst"
}