irqbalance: add init script
authorAleksandr Mezin <redacted>
Thu, 2 May 2019 19:15:01 +0000 (01:15 +0600)
committerHannu Nyman <redacted>
Sun, 2 Jun 2019 09:13:53 +0000 (12:13 +0300)
Signed-off-by: Aleksandr Mezin <redacted>
utils/irqbalance/Makefile
utils/irqbalance/files/irqbalance.init [new file with mode: 0644]

index 3777fde1ae55e81cf825875be4dc2d961c2e4610..59536d04d392982996178a0aa88ef4350d4f1294 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=irqbalance
 PKG_VERSION:=1.2.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_PROTO:=git
@@ -47,6 +47,8 @@ CONFIGURE_ARGS+= \
 define Package/irqbalance/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/irqbalance $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/irqbalance.init $(1)/etc/init.d/irqbalance
 endef
 
 $(eval $(call BuildPackage,irqbalance))
diff --git a/utils/irqbalance/files/irqbalance.init b/utils/irqbalance/files/irqbalance.init
new file mode 100644 (file)
index 0000000..34db0a2
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+
+START=11
+USE_PROCD=1
+
+start_service() {
+  procd_open_instance "irqbalance"
+  procd_set_param command /usr/sbin/irqbalance -f
+  procd_set_param respawn
+  procd_close_instance
+}
+
git clone https://git.99rst.org/PROJECT