From 93ebbfed0a9fd33c58b9a7205acb30e406913c0e Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Sat, 16 Sep 2023 23:44:31 +0000 Subject: [PATCH] https-dns-proxy: improve boot up startup Signed-off-by: Stan Grishin (cherry picked from commit 22d21e28a79a5246e4f6068cbc0be59e5226c486) --- net/https-dns-proxy/Makefile | 6 +++--- .../files/etc/hotplug.d/iface/90-https-dns-proxy | 14 ++++++++++++++ .../files/etc/hotplug.d/online/30-https-dns-proxy | 2 -- 3 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 net/https-dns-proxy/files/etc/hotplug.d/iface/90-https-dns-proxy delete mode 100644 net/https-dns-proxy/files/etc/hotplug.d/online/30-https-dns-proxy diff --git a/net/https-dns-proxy/Makefile b/net/https-dns-proxy/Makefile index 3319cbfe50..88b7577494 100644 --- a/net/https-dns-proxy/Makefile +++ b/net/https-dns-proxy/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=https-dns-proxy PKG_VERSION:=2023-05-25 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/aarond10/https_dns_proxy/ @@ -45,8 +45,8 @@ define Package/https-dns-proxy/install $(SED) "s|^\(readonly PKG_VERSION\).*|\1='$(PKG_VERSION)-$(PKG_RELEASE)'|" $(1)/etc/init.d/https-dns-proxy $(INSTALL_DIR) $(1)/etc/config $(INSTALL_CONF) ./files/etc/config/https-dns-proxy $(1)/etc/config/https-dns-proxy - $(INSTALL_DIR) $(1)/etc/hotplug.d/online - $(INSTALL_DATA) ./files/etc/hotplug.d/online/30-https-dns-proxy $(1)/etc/hotplug.d/online/30-https-dns-proxy + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DATA) ./files/etc/hotplug.d/iface/90-https-dns-proxy $(1)/etc/hotplug.d/iface/90-https-dns-proxy $(INSTALL_DIR) $(1)/etc/uci-defaults/ $(INSTALL_BIN) ./files/etc/uci-defaults/50-https-dns-proxy-migrate-options.sh $(1)/etc/uci-defaults/50-https-dns-proxy-migrate-options.sh endef diff --git a/net/https-dns-proxy/files/etc/hotplug.d/iface/90-https-dns-proxy b/net/https-dns-proxy/files/etc/hotplug.d/iface/90-https-dns-proxy new file mode 100644 index 0000000000..5acf7b7d0c --- /dev/null +++ b/net/https-dns-proxy/files/etc/hotplug.d/iface/90-https-dns-proxy @@ -0,0 +1,14 @@ +#!/bin/sh +# Copied from https://openwrt.org/docs/guide-user/advanced/hotplug_extras +# shellcheck disable=SC1091 +. /lib/functions/network.sh +network_flush_cache +network_find_wan NET_IF +network_find_wan6 NET_IF6 +[ "$INTERFACE" != "$NET_IF" ] && [ "$INTERFACE" != "$NET_IF6" ] && exit 0 +[ "$ACTION" != "ifup" ] && [ "$ACTION" != "ifupdate" ] && exit 0 +[ "$ACTION" = "ifupdate" ] && [ -z "$IFUPDATE_ADDRESSES" ] && \ +[ -z "$IFUPDATE_DATA" ] && exit 0 + +sleep 10 +/etc/init.d/https-dns-proxy start 'on_hotplug' diff --git a/net/https-dns-proxy/files/etc/hotplug.d/online/30-https-dns-proxy b/net/https-dns-proxy/files/etc/hotplug.d/online/30-https-dns-proxy deleted file mode 100644 index 0ff3ca28fb..0000000000 --- a/net/https-dns-proxy/files/etc/hotplug.d/online/30-https-dns-proxy +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -/etc/init.d/https-dns-proxy start 'on_hotplug' -- 2.30.2