projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dnsmasq: add mx record support
[openwrt.git]
/
package
/
dnsmasq
/
files
/
dnsmasq.init
diff --git
a/package/dnsmasq/files/dnsmasq.init
b/package/dnsmasq/files/dnsmasq.init
index
b0c2cd2
..
edd22ad
100644
(file)
--- a/
package/dnsmasq/files/dnsmasq.init
+++ b/
package/dnsmasq/files/dnsmasq.init
@@
-360,13
+360,31
@@
dhcp_srv_add() {
[ -n "$target" ] || return 0
config_get port "$cfg" port
[ -n "$target" ] || return 0
config_get port "$cfg" port
+ [ -n "$port" ] || return 0
- local service="$srv,$target"
- [ -n "$port" ] && service="$service,$port"
+ config_get class "$cfg" class
+ config_get weight "$cfg" weight
+
+ local service="$srv,$target,$port${class:+,$class${weight:+,$weight}}"
append args "-W $service"
}
append args "-W $service"
}
+dhcp_mx_add() {
+ local cfg="$1"
+
+ [ -n "$domain" ] || return 0
+
+ config_get relay "$cfg" relay
+ [ -n "$relay" ] || return 0
+
+ config_get pref "$cfg" pref 0
+
+ local service="$domain,$relay,$pref"
+
+ append args "--mx-host=$service"
+}
+
dhcp_cname_add() {
local cfg="$1"
local cname target
dhcp_cname_add() {
local cfg="$1"
local cname target
@@
-401,6
+419,7
@@
start() {
config_foreach dhcp_subscrid_add subscrid
config_foreach dhcp_domain_add domain
config_foreach dhcp_srv_add srvhost
config_foreach dhcp_subscrid_add subscrid
config_foreach dhcp_domain_add domain
config_foreach dhcp_srv_add srvhost
+ config_foreach dhcp_mx_add mxhost
config_foreach dhcp_add dhcp
config_foreach dhcp_cname_add cname
config_foreach dhcp_add dhcp
config_foreach dhcp_cname_add cname
This page took
0.024704 seconds
and
4
git commands to generate.