#!/bin/sh
# chargement d'un peripherique de stockage usb
#

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)
		echo "add storage device"
		/etc/init.d/usb_storage mount_all
		/etc/init.d/samba update
		;;
	remove)
		echo "remove storage device"
		/etc/init.d/samba stop
		/etc/init.d/usb_storage restart
		/etc/init.d/samba start
		;;
esac	

