#!/bin/sh
# pluging in a usb mass storage device
#

if [ -f /etc/init.d/ntp ]; then
    if [ -f /var/run/ntp_delta ]; then
        current_date=$(date -n +"%Y/%m/%d %X")
    else
        current_date=$(date +"%j ------ %X")
    fi
else
    current_date=$(date +"%j %X")
fi

case $ACTION in
    add)
	/etc/init.d/usb_storage mount_usbdisk $DEVNUM
	;;
    remove)
	/etc/init.d/usb_storage umount_usbdisk $DEVNUM	
	;;
esac

/etc/usbmgr/usbledctrl ACTION
