update 2024-11-21 02:10:23

This commit is contained in:
actions-user 2024-11-21 02:10:23 +08:00
parent 1e090b9fba
commit e157cc5c53
5 changed files with 36 additions and 3 deletions

View File

@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk
PKG_ARCH_quickstart:=$(ARCH)
PKG_NAME:=quickstart
PKG_VERSION:=0.9.3
PKG_VERSION:=0.9.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/linkease/istore-packages/releases/download/prebuilt/
PKG_HASH:=1f5bc06098413a4cd30f3ba864e11d1214aa0ae782716911372cac1cf8845bf9
PKG_HASH:=11da47a32c15dffcf44ee04e2156dc305b8354985bf1551b24d735fe56777c0b
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION)
@ -57,12 +57,17 @@ define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/uci-defaults $(1)/etc/hotplug.d/block $(1)/etc/config
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/uci-defaults $(1)/etc/hotplug.d/block $(1)/etc/config $(1)/usr/libexec/quickstart
$(INSTALL_BIN) $(PKG_BUILD_DIR)/quickstart.$(PKG_ARCH_quickstart) $(1)/usr/sbin/quickstart
$(INSTALL_BIN) ./files/quickstart.init $(1)/etc/init.d/quickstart
$(INSTALL_BIN) ./files/quickstart.uci-default $(1)/etc/uci-defaults/09-quickstart
$(INSTALL_BIN) ./files/quickstart.hotplug $(1)/etc/hotplug.d/block/09-quickstart
$(INSTALL_CONF) ./files/quickstart.config $(1)/etc/config/quickstart
$(INSTALL_BIN) ./files/dhcpvalid.sh $(1)/usr/libexec/quickstart/dhcpvalid.sh
$(INSTALL_BIN) ./files/startdhns.init $(1)/etc/init.d/startdhns
$(LN) /usr/sbin/quickstart $(1)/usr/sbin/startdhns
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./files/startdhns.hotplug $(1)/etc/hotplug.d/iface/21-startdhns
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

4
quickstart/files/dhcpvalid.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
/usr/sbin/quickstart dhcpValid

View File

@ -3,6 +3,8 @@
if [ "$PKG_UPGRADE" = 1 ]; then
/etc/init.d/quickstart enable
/etc/init.d/quickstart start
/etc/init.d/startdhns enable
/etc/init.d/startdhns boot
fi
exit 0

View File

@ -0,0 +1,9 @@
[ "$INTERFACE" = "planb" -o "$INTERFACE" = "wan" ] || exit 0
if [ "$ACTION" = "ifup" -o "$ACTION" = "ifupdate" ]; then
/usr/sbin/quickstart ifaceEvent up "$INTERFACE"
fi
if [ "$ACTION" = "ifdown" ]; then
/usr/sbin/quickstart ifaceEvent down "$INTERFACE"
fi

13
quickstart/files/startdhns.init Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh /etc/rc.common
START=93
USE_PROCD=1
start_service() {
/usr/sbin/quickstart uciChange
}
service_triggers()
{
procd_add_reload_trigger network
}