diff options
Diffstat (limited to 'package/system/fstools')
-rw-r--r-- | package/system/fstools/Makefile | 3 | ||||
-rw-r--r-- | package/system/fstools/files/media-change.hotplug | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile index 58be215f8f..60ccf09e11 100644 --- a/package/system/fstools/Makefile +++ b/package/system/fstools/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fstools -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git @@ -110,6 +110,7 @@ define Package/block-mount/install $(INSTALL_BIN) ./files/fstab.init $(1)/etc/init.d/fstab $(INSTALL_CONF) ./files/fstab.default $(1)/etc/uci-defaults/10-fstab $(INSTALL_CONF) ./files/mount.hotplug $(1)/etc/hotplug.d/block/10-mount + $(INSTALL_CONF) ./files/media-change.hotplug $(1)/etc/hotplug.d/block/00-media-change $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/block $(1)/sbin/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblkid-tiny.so $(1)/lib/ diff --git a/package/system/fstools/files/media-change.hotplug b/package/system/fstools/files/media-change.hotplug new file mode 100644 index 0000000000..30fc3d5c4f --- /dev/null +++ b/package/system/fstools/files/media-change.hotplug @@ -0,0 +1,8 @@ +[ -n "$DISK_MEDIA_CHANGE" ] && /sbin/block info + +if [ "$ACTION" = "add" -a "$DEVTYPE" = "disk" ]; then + case "$DEVNAME" in + mtd*) : ;; + *) echo 2000 > /sys/block/$DEVNAME/events_poll_msecs ;; + esac +fi |