1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-12-22 12:46:27 +02:00

cgmienr: add usb hotplug for Icarus

This commit is contained in:
Xiangfu 2012-05-11 12:24:22 +08:00
parent f3e7354c90
commit 81a45499ec
2 changed files with 18 additions and 1 deletions

View File

@ -54,12 +54,14 @@ endef
define Package/cgminer/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/hotplug.d/usb
$(INSTALL_BIN) $(PKG_BUILD_DIR)/cgminer-api $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgminer $(1)/usr/bin
$(INSTALL_BIN) $(FILES_DIR)/cgminer $(1)/etc/init.d
$(CP) $(FILES_DIR)/20-icarus.hotplug $(1)/etc/hotplug.d/usb/20-icarus
endef
$(eval $(call BuildPackage,cgminer))

View File

@ -0,0 +1,15 @@
#!/bin/sh
# Copyright (C) 2009 OpenWrt.org
if [ "${PRODUCT}" = "67b/2303/400" ] && [ "$TYPE" = "0/0/0" ] && [ "$INTERFACE" = "255/0/0" ]; then
case "$ACTION" in
add)
killall -s 9 sleep
killall -s 9 cgminer
sleep 1 && /etc/init.d/cgminer start &
;;
remove)
;;
esac
fi