I am trying to use the ntfs-3g driver that is shipped with Mandriva
2007 

rpm -qa | grep -i ntfs

libntfs9-1.13.1-1mdv2007.0
libntfs-3g0-0.1-0.20070714.2mdv2007.0
ntfs-3g-0.1-0.20070714.2mdv2007.0
ntfsprogs-1.13.1-1mdv2007.0

rpm -qa | grep -i fuse 

libfuse2-2.5.3-3mdk
fuse-2.5.3-3mdk

Although I got the driver to successfully work and my Maxtor OneTouch
III successfully mounts at /dev/fuse but my biggest challenge is that
HAL doesn't cleanup/unmount the mount point in /etc/fstab after I unplug
the USB connection to the Maxtor External Drive.

Any suggestions, ideas?

--Sandeep Khanna

Following are my updates to the HAL related scripts, policy files.

/usr/share/hal/scripts/hal-system-storage-mount

if [ "$MOUNTTYPE" != "" ]; then
#
# If we are mounting NTFS, check for the existence of ntfs-3g.
# The default install location is /usr/local/bin/ntfs-3g, so add
# /usr/local/bin to the PATH.
#
#    if [ "$MOUNTTYPE" == "ntfs" ]; then
#       PATH="$PATH:/usr/local/bin"
#       NTFS_3G_SUPPORT=`/usr/bin/which ntfs-3g 2>&1 | grep -v no`
#       if [ "$NTFS_3G_SUPPORT" != "" ]; then
#           MOUNTTYPE="ntfs-3g"
#       fi
#    fi 
#    MOUNTTYPE_EXPANDED="-t $MOUNTTYPE"
#else
#    MOUNTTYPE_EXPANDED=""
#fi

# mount and return status
#
# The default options are OK for ntfs-3g. We need to add the "nonempty"
option since
# HAL puts ".created-by-hal" in the mountpoint.
#
echo
"#######################################################################
\$MOUNTTYPE_EXPANDED = $MOUNTTYPE_EXPANDED"
echo
"#######################################################################
\$HAL_PROP_BLOCK_DEVICE = $HAL_PROP_BLOCK_DEVICE"
if [ "$MOUNTTYPE" == "ntfs-3g" ]; then
RESULT=$(mount -o "nonempty,noexec,nosuid,nodev$MOUNTOPTIONS"
$MOUNTTYPE_EXPANDED "$HAL_PROP_BLOCK_DEVICE" "$MOUNT_ROOT/$MOUNTPOINT"
2>&1)
else 
RESULT=$(mount -o "noexec,nosuid,nodev$MOUNTOPTIONS" $MOUNTTYPE_EXPANDED
"$HAL_PROP_BLOCK_DEVICE" "$MOUNT_ROOT/$MOUNTPOINT" 2>&1)
if [ $? -ne 0 ]; then
    case "$RESULT" in
        *"unknown filesystem"*)
            echo
"org.freedesktop.Hal.Device.Volume.UnknownFilesystemType" >&2
            echo "Invalid filesystem type." >&2
            ;;
        *)
            echo "org.freedesktop.Hal.Device.Volume.UnknownFailure" >&2
            echo "Failed to mount device." >&2
    esac
    rm -f "$MOUNT_ROOT/$MOUNTPOINT/.created-by-hal"
    rmdir "$MOUNT_ROOT/$MOUNTPOINT"
    exit 1
fi
fi

I have also
updated /usr/share/hal/fdi/policy/10osvendor/20-storage-medthods.fdi to
add a section of ntfs-3g



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to