mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-11-25 17:54:39 +02:00
cgmienr: add usb hotplug for Icarus
This commit is contained in:
parent
f3e7354c90
commit
81a45499ec
@ -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))
|
||||
|
15
cgminer/files/20-icarus.hotplug
Normal file
15
cgminer/files/20-icarus.hotplug
Normal 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
|
Loading…
Reference in New Issue
Block a user