- install posixovl (i.g. via synaptic);
- rename /sbin/mount-posixovl -> mount-posixovl.orig;
- create a new mount-posixovl in sbin:
#!/bin/bash
# wrapper for mount.posixovl to conform with common mount syntax
# with this wrapper posixovl can be used in fstab
# location of the original mount.posixovl
origposixovl="/sbin/mount.posixovl.orig"
# gather inputs
while [ $# -gt 0 ]; do
if [[ "$1" == -* ]]; then
# var is an input switch
# we can only use the -o or -F switches
if [[ "$1" == *F* ]]; then
optsF="-F"
else
optsF=""
fi
if [[ "$1" == *o* ]]; then
shift
optsfuse="-- -o $1"
else
optsfuse=""
fi
shift
else
# var is a main argument
sourcedir="$1"
shift
if [[ "$1" != -* ]]; then
targetdir="$1"
shift
else
targetdir="$sourcedir"
fi
fi
done
# verify inputs
if [ "$sourcedir" == "" ]; then
echo "no source specified"
exit 1
fi
if [ "$targetdir" == "" ]; then
echo "no target specified"
exit 1
fi
# build mount.posixovl command
"$origposixovl" $optsF -S "$sourcedir" "$targetdir" $optsfuse
- add to /etc/fstab something like this (depending on the name of your device):
LABEL=Basic\0402 /media/duns/basic2 vfat user,rw,noauto,uid=1000,gid=1000,iocharset=iso8859-1,shortname=mixed,showexec,utf8 1 2
/media/duns/basic2 /mnt/e-reader posixovl noauto 0 0
- create a script, like this:
#!/bin/bash
wmctrl -c mount.posixovl.orig
mount /media/duns/basic2
mount.posixovl -F /media/duns/basic2 /mnt/e-reader
krusader --left /mnt/e-reader/ebooks --right /mnt/zippati/eBooks
done!
No comments:
Post a Comment