Skip to content

Commit b982956

Browse files
committed
IPKG_INSTROOT and ubus fixes
1 parent fc8a207 commit b982956

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
33

44
PKG_NAME:=https-dns-proxy
55
PKG_VERSION:=2025.09.11
6-
PKG_RELEASE:=2
6+
PKG_RELEASE:=3
77

88
PKG_SOURCE_PROTO:=git
99
PKG_SOURCE_URL:=https://github.com/baranyaib90/https_dns_proxy/

files/etc/init.d/https-dns-proxy

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ STOP=15
99
# shellcheck disable=SC2034
1010
USE_PROCD=1
1111

12-
[ -n "${IPKG_INSTROOT}" ] && return 0
13-
1412
if type extra_command 1>/dev/null 2>&1; then
1513
extra_command 'version' 'Show version information'
1614
else
@@ -30,6 +28,16 @@ readonly DEFAULT_BOOTSTRAP="${BOOTSTRAP_CF},${BOOTSTRAP_GOOGLE}"
3028
readonly canaryDomainsMozilla='use-application-dns.net'
3129
readonly canaryDomainsiCloud='mask.icloud.com mask-h2.icloud.com'
3230

31+
# Silence "Command failed: Not found" for redundant procd service delete calls
32+
__UBUS_BIN="$(command -v ubus || echo /bin/ubus)"
33+
ubus() {
34+
if [ "$1" = "call" ] && [ "$2" = "service" ] && [ "$3" = "delete" ]; then
35+
"$__UBUS_BIN" "$@" >/dev/null 2>&1 || true
36+
else
37+
"$__UBUS_BIN" "$@"
38+
fi
39+
}
40+
3341
hdp_boot_flag=
3442

3543
# package global config variables
@@ -362,7 +370,7 @@ service_triggers() {
362370
output "Setting trigger (on_boot) "
363371
procd_add_raw_trigger "interface.*.up" 5000 "/etc/init.d/${packageName}" restart 'on_interface_up' && output_okn || output_failn
364372
else
365-
. /lib/functions/network.sh
373+
. "${IPKG_INSTROOT}/lib/functions/network.sh"
366374
network_flush_cache
367375
network_find_wan wan
368376
wan="${wan:-wan}"

files/etc/uci-defaults/50-https-dns-proxy-migrate-options.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/sh
2+
3+
24
sed -i "s|update_dnsmasq_config|dnsmasq_config_update|" "/etc/config/https-dns-proxy"
35
sed -i "s|wan6_trigger|procd_trigger_wan6|" "/etc/config/https-dns-proxy"
46
sed -i "s|procd_fw_src_interfaces|force_dns_src_interface|" "/etc/config/https-dns-proxy"

0 commit comments

Comments
 (0)