Hi guys,
I wrote a little script to facilitate easy ntfs rw mounting using fuse (it mounts on /mnt/ntfs). It's pasted below for comments, ideas, etc. It works from the command line, but the problem is that if I want to run it via the KDE menu it doesn't find the fuse module. With all other commands this can be solved by giving the full path (e.g. initrd/sbin/...), but that doesn't work for the "modprobe fuse" command. I wonder if anyone has an idea what could be done about that, because later I hope to make it executable via double-click from the desktop (and I could image that future MCNlive distributions may benefit from having a script like this one to make life easier for newbies).
-----------------------------
#!/bin/sh
success="1"
until [ $success -eq 0 ]
do
dialog --title "Mounting NTFS" --backtitle "Mount NTFS partition as writable" --inputbox "Partition name (e.g. hda5)" 8 55 2>/tmp/input
sel=$?
if [ $sel -eq 1 ]
then
exit 0
fi
p="/dev/"
location=`cat /tmp/input`
path=$p$location
echo "Checking..."
ls $path
pexist=$?
if [ $pexist -eq 0 ]
then
success="0"
else
success="1"
dialog --title "Error - Invalid Partition" --backtitle "Mount NTFS partition as writable" --msgbox "The partition $location does not exist, please try again." 8 50 2>/tmp/input3
fi
done
mkdir /mnt/ntfs
umount $path
modprobe fuse
mount -t ntfs-3g -o user,umask=0 $path /mnt/ntfs
result=$?
if [ $result -eq 0 ]
then
dialog --title "Mounting NTFS" --backtitle "Mount NTFS partition as writable" --msgbox "$location has been successfully mounted." 8 50 2>/tmp/input3
else
dialog --title "ERROR" --backtitle "Mount NTFS partition as writable" --msgbox "The partition $location could not be mounted." 8 50 2>/tmp/input3
fi
rm -f /tmp/input
rm -f /tmp/input3