fstools: media change detection (eg:sdcard) using kernel polling
[openwrt/.git] / package / system / fstools / files / media-change.hotplug
1 [ -n "$DISK_MEDIA_CHANGE" ] && /sbin/block info
2
3 if [ "$ACTION" = "add" -a "$DEVTYPE" = "disk" ]; then
4         case "$DEVNAME" in
5                 mtd*) : ;;
6                 *) echo 2000 > /sys/block/$DEVNAME/events_poll_msecs ;;
7         esac
8 fi