mirror of
https://github.com/openwrt/packages.git
synced 2025-12-10 12:41:22 +00:00
pbr 1.2.1-r35 Makefile: * split uci-defaults into different purpose files * add handling of netifd integration Config: * update with default values for all options (thanks @betonmischer86) Init-script: * add netifd integration handling * add ip() function to emulate ip rule replace * add netbird intrfaces support (thanks @egc112) * reorganize loading/handling of options in load_package_config() * improve display of interface triggers in service_triggers() * remove chains cleanup from stop_service() due to exclusive use of fw4 nft files * improve status_service() output * drop input and postrouting as valid options for policy chain Uci-defaults files: * 91-pbr-nft: cosmetic improvements Default nft files: * drop use of input and postrouting chanins Custom User files: * dns-prefetch: functional improvements (thanks @betonmischer86) Signed-off-by: Stan Grishin <stangri@melmac.ca>
25 lines
803 B
Bash
25 lines
803 B
Bash
#!/bin/sh
|
|
# shellcheck disable=SC2015,SC3037,SC3043
|
|
|
|
readonly pbrFunctionsFile='/etc/init.d/pbr'
|
|
if [ -s "$pbrFunctionsFile" ]; then
|
|
# shellcheck source=../../etc/init.d/pbr
|
|
. "$pbrFunctionsFile"
|
|
else
|
|
printf "%b: pbr init.d file (%s) not found! \n" '\033[0;31mERROR\033[0m' "$pbrFunctionsFile"
|
|
fi
|
|
|
|
# Transition resolver_set depending on dnsmasq support
|
|
if [ "$(uci_get "$packageName" 'config' 'resolver_set')" != 'dnsmasq.nftset' ]; then
|
|
if check_dnsmasq_nftset; then
|
|
output "Setting resolver_set to 'dnsmasq.nftset'... "
|
|
uci_set "$packageName" 'config' 'resolver_set' 'dnsmasq.nftset' && output_okn || output_failn
|
|
else
|
|
output "Setting resolver_set to 'none'... "
|
|
uci_set "$packageName" 'config' 'resolver_set' 'none' && output_okn || output_failn
|
|
fi
|
|
uci_commit "$packageName"
|
|
fi
|
|
|
|
exit 0
|