#!/bin/sh
# FILE: /usr/sbin/hotplug
# Copyright (C) 2012 GuoWenxue <guowenxue@gmail.com QQ:281143292>
# This shell scripts used to auto mount USB storage, called by /etc/mdev.conf

mnt_point=$1

if [ ! -d $mount_point ] ; then 
   exit;
fi

case $ACTION in
  remove)
     if [ $DEVTYPE = "partition" ] ; then  
        /bin/umount $mnt_point
     fi
     ;;
     
  add)
     if [ $DEVTYPE = "partition" ] ; then  
        /bin/mount /dev/$MDEV $mnt_point
     fi
     ;;
     
esac
     
