mirror of
https://github.com/vgough/encfs.git
synced 2025-01-22 05:38:34 +01:00
Use umount
on systems where fusermount
is not available.
This commit is contained in:
parent
340fefda32
commit
95d6ae8bec
@ -60,6 +60,10 @@ echo "Directory is $unenc_dir"
|
|||||||
orig_dir=$(pwd)
|
orig_dir=$(pwd)
|
||||||
cd $unenc_dir
|
cd $unenc_dir
|
||||||
|
|
||||||
# Set the shell up
|
# Fall back to umount if fusermount is not available (e.g., on OS X)
|
||||||
exec /bin/sh -c "$SHELL ; cd $orig_dir ; fusermount -u $unenc_dir ; if ! $unenc_dir_given; then rmdir $unenc_dir; fi"
|
FUSE_UMOUNT="$(which 2>/dev/null fusermount)"
|
||||||
|
FUSE_UMOUNT="${FUSE_UMOUNT:+fusermount -u}"
|
||||||
|
FUSE_UMOUNT="${FUSE_UMOUNT:-umount}"
|
||||||
|
|
||||||
|
# Set the shell up
|
||||||
|
exec /bin/sh -c "$SHELL ; cd $orig_dir ; $FUSE_UMOUNT $unenc_dir ; if ! $unenc_dir_given; then rmdir $unenc_dir; fi"
|
||||||
|
Loading…
Reference in New Issue
Block a user