分类: LINUX
2010-04-09 09:23:24
QUOTE: |
#!/bin/bash LOG=/var/log/usb-hotplug.log lap=$(date --rfc-3339=ns) echo "$lap: $DEVPATH requesting $ACTION" >> $LOG if [ $ACTION == "add" ] then mount -t vfat -o umask=000,noatime,async,codepage=936,iocharset=gb2312 \ /dev/sda1 /media/usbkey elif [ $ACTION == "remove" ] then umount -l /media/usbkey fi |