dnsmasq: add option to expose additional paths

This commit is contained in:
守望 2025-02-06 12:30:04 +08:00 committed by GitHub
parent 8858bea842
commit cadb05400b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -205,8 +205,12 @@ ismounted() {
return 1 return 1
} }
append_addnhosts() { append_extramount() {
ismounted "$1" || append EXTRA_MOUNT "$1" ismounted "$1" || append EXTRA_MOUNT "$1"
}
append_addnhosts() {
append_extramount "$1"
xappend "--addn-hosts=$1" xappend "--addn-hosts=$1"
} }
@ -1158,6 +1162,8 @@ dnsmasq_start()
done done
} }
config_list_foreach "$cfg" addnmount append_extramount
procd_open_instance $cfg procd_open_instance $cfg
procd_set_param command $PROG -C $CONFIGFILE -k -x /var/run/dnsmasq/dnsmasq."${cfg}".pid procd_set_param command $PROG -C $CONFIGFILE -k -x /var/run/dnsmasq/dnsmasq."${cfg}".pid
procd_set_param file $CONFIGFILE procd_set_param file $CONFIGFILE