--- etc/hotplug/run_mount.orig	2008-09-03 10:52:22.000000000 +0200
+++ etc/hotplug/run_mount	2008-09-03 10:52:29.000000000 +0200
@@ -21,19 +21,9 @@
 
 ## Generate a frontend'able 'nice name' to be used as mount point:
 nicename () {
-## Find device's strings, remove/translate evil chars...
-local MANU=`cat $SYSFS/block/$1/device/vendor|tr -d ' '|tr -c "\na-zA-Z0-9" '-'`
-local NAME=`cat $SYSFS/block/$1/device/model|tr -d ' '|tr -c "\na-zA-Z0-9" '-'`
-local PARTHEX=$3
-if [ $PARTHEX -gt 9 ]; then
-PARTHEX=`echo $((PARTHEX-10)) | tr "0-5" "A-F"`
-fi
-test -z "$NAME" && NAME="Storage"
-test -n "$MANU" && NAME="$MANU-$NAME"
-## limit NAME to 30 characters+3 extra characters (-00)
-NAME=`echo -n "$NAME" | sed -e 's#\(.\{0,30\}\).*#\1#g'`
-## Build nice name: [Vendor-Product]-<x><y>
-echo "$NAME-$2$PARTHEX"
+local NICE=""
+NICE="uStor`echo $1|sed 's/^..//;s/a/0/;s/b/1/;s/c/2/;s/d/3/;s/e/4/;s/f/5/;s/g/6/;s/h/7/;s/i/8/;s/j/9/'`$3"
+echo $NICE
 }
 ## Simple semaphore stuff:
 ## includes /etc/hotplug/rc.usbsema
@@ -44,6 +34,37 @@
 ## atomic_touch (Filename)
 USBLOCKFILE=/var/USBLOCK_storage
 test -f /etc/hotplug/rc.usbsema && . /etc/hotplug/rc.usbsema
+
+mount_fs () {
+ # mount according to type of filesystem 
+ # return exit code: true - all went well; other - something went wrong 
+ # gobal variables: 
+ #  $DEVNODE, $MNTPATH, READMODE, FTPUID, FTPGID 
+	FSTYPE="vfat"   # default as long as we dont know better 
+	[[ -x /usr/bin/fstyp ]] && FSTYPE=`/usr/bin/fstyp $DEVNODE` 
+	
+	case $FSTYPE in
+	vfat)
+		mount -t vfat -o $READMODE,uid=$FTPUID,gid=$FTPGID,fmask=0000,dmask=0000 $DEVNODE $MNTPATH
+		;;
+	ext2)
+		mount -t ext2 $DEVNODE $MNTPATH -o noatime,nodiratime,rw,async
+		;;
+	ext3)
+		mount -t ext3 $DEVNODE $MNTPATH -o noatime,nodiratime,rw,async
+		;;
+	ntfs)
+		/usr/bin/ntfs-3g $DEVNODE $MNTPATH -o force
+		;;
+	reiserfs)
+		mount -t reiserfs $DEVNODE $MNTPATH -o noatime,nodiratime,rw,async
+		;;
+	*) # fs type unknown
+		mount $DEVNODE $MNTPATH
+		;;
+	esac
+}
+
 ## Actually perform the mount operation...
 ## (TODO Checking the partition for known filesystem types)
 do_mount () {
@@ -75,7 +95,7 @@
 local OLD_UMASK=`umask`
 umask 0
 local new_filesystem=false
-if mount -t vfat -o $READMODE,shortname=winnt,uid=$FTPUID,gid=$FTPGID $DEVNODE $MNTPATH; then
+if mount_fs; then
 new_filesystem=true
 fi
 if [ $new_filesystem = true ] ; then
@@ -118,6 +118,7 @@
 led-ctrl filesystem_mount_failure
 umask $OLD_UMASK
 rmdir $MNTPATH
+eventadd 142 $MNTNAME NOTMOUNTABLE
 fi
 if grep $MNTPATH /proc/mounts > /dev/null; then
 if test -f $1; then
