Created
October 1, 2013 00:19
-
-
Save djwong/6772237 to your computer and use it in GitHub Desktop.
fuse2fs fake /bin/mount script. Sort of.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Mount ext4 via fuse. If you're using this with icsum.sh to use fuse2fs | |
# instead of the kernel driver, put the fuse2fs binary and this script in a | |
# directory; rename this script to "mount"; and then put the directory | |
# containing this script at the head of $PATH before running icsum.sh. | |
for arg in "$@"; do | |
if [ -b "${arg}" ]; then | |
DEV="${arg}" | |
elif [ -d "${arg}" ]; then | |
MNT="${arg}" | |
fi | |
done | |
if [ -z "${DEV}" -o -z "${MNT}" ]; then | |
echo "Please specify a device and a mountpoint." | |
fi | |
DIR="$(dirname "$0")" | |
# CHEAP TRICK | |
umount "${MNT}" > /dev/null 2> /dev/null | |
export FUSE2FS_LOGFILE=/dev/ttyprintk | |
if [ -f "${FUSE2FS_LOGFILE}" ]; then | |
rm -rf "${FUSE2FS_LOGFILE}" | |
fi | |
exec "${DIR}/../e2fsprogs-csum/misc/fuse2fs" "${DEV}" "${MNT}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment