mirror of
https://github.com/openwrt/routing.git
synced 2026-07-18 12:11:53 +04:00
hnetd: add global config file
This commit is contained in:
+18
-1
@@ -16,6 +16,10 @@ PCP_SCRIPT=/usr/sbin/hnetd-pcp-script
|
||||
PCP_BINARY=/usr/sbin/minimalist-pcproxy
|
||||
|
||||
start_service() {
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/network.sh
|
||||
config_load hnet
|
||||
|
||||
mkdir -p $DNSMASQ_DIR
|
||||
procd_open_instance
|
||||
procd_set_param command /usr/sbin/hnetd
|
||||
@@ -41,11 +45,24 @@ start_service() {
|
||||
fi
|
||||
|
||||
# State file
|
||||
procd_append_param command -s /tmp/hnetd.pa_state
|
||||
config_get val pa persistent_store
|
||||
procd_append_param command -s ${val:-/tmp/hnetd.pa_state}
|
||||
|
||||
# Routing script
|
||||
procd_append_param command -r /usr/sbin/hnetd-routing
|
||||
|
||||
config_get val pa ip4prefix
|
||||
[ -n "$val" ] && procd_append_param command --ip4prefix $val
|
||||
|
||||
config_get val pa ulaprefix
|
||||
[ -n "$val" ] && procd_append_param command --ulaprefix $val
|
||||
|
||||
config_get val sd router_name
|
||||
[ -n "$val" ] && procd_append_param command -n $val
|
||||
|
||||
config_get val sd domain_name
|
||||
[ -n "$val" ] && procd_append_param command -m $val
|
||||
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user