forked from freifunk-franken/firmware
fff-dhcp: fix indexing and output in uci-defaults
When creating a new uci section, the safest way to refer to it is with index '-1'. While it (probably) does not make a functional difference for our specific case, since we expect to only have one section anyway, let's just make sure and use the proper indexing. While at it, suppress output from the 'add' command. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Robert Langhammer <rlanghammer@web.de>
This commit is contained in:
parent
1946aaca87
commit
597ecdc244
|
@ -1,7 +1,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fff-dhcp
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=5
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
uci batch <<EOF
|
||||
uci batch >/dev/null <<EOF
|
||||
delete dhcp.@dnsmasq[0]
|
||||
delete dhcp.lan
|
||||
delete dhcp.wan
|
||||
add dhcp dnsmasq
|
||||
set dhcp.@dnsmasq[0].domainneeded='0'
|
||||
set dhcp.@dnsmasq[0].boguspriv='0'
|
||||
set dhcp.@dnsmasq[0].filterwin2k='0'
|
||||
set dhcp.@dnsmasq[0].localise_queries='0'
|
||||
set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
set dhcp.@dnsmasq[0].rebind_localhost='1'
|
||||
set dhcp.@dnsmasq[0].domain='fff.community'
|
||||
set dhcp.@dnsmasq[0].expandhosts='0'
|
||||
set dhcp.@dnsmasq[0].nonegcache='0'
|
||||
set dhcp.@dnsmasq[0].authoritative='1'
|
||||
set dhcp.@dnsmasq[0].readethers='1'
|
||||
set dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
|
||||
set dhcp.@dnsmasq[0].noresolv='1'
|
||||
set dhcp.@dnsmasq[0].localservice='1'
|
||||
add_list dhcp.@dnsmasq[0].server='10.50.252.11'
|
||||
add_list dhcp.@dnsmasq[0].server='10.50.252.0'
|
||||
add_list dhcp.@dnsmasq[0].server='/in-addr.arpa/10.50.252.11'
|
||||
add_list dhcp.@dnsmasq[0].server='/in-addr.arpa/10.50.252.0'
|
||||
add_list dhcp.@dnsmasq[0].server='/ip6.arpa/10.50.252.11'
|
||||
add_list dhcp.@dnsmasq[0].server='/ip6.arpa/10.50.252.0'
|
||||
set dhcp.@dnsmasq[-1].domainneeded='0'
|
||||
set dhcp.@dnsmasq[-1].boguspriv='0'
|
||||
set dhcp.@dnsmasq[-1].filterwin2k='0'
|
||||
set dhcp.@dnsmasq[-1].localise_queries='0'
|
||||
set dhcp.@dnsmasq[-1].rebind_protection='0'
|
||||
set dhcp.@dnsmasq[-1].rebind_localhost='1'
|
||||
set dhcp.@dnsmasq[-1].domain='fff.community'
|
||||
set dhcp.@dnsmasq[-1].expandhosts='0'
|
||||
set dhcp.@dnsmasq[-1].nonegcache='0'
|
||||
set dhcp.@dnsmasq[-1].authoritative='1'
|
||||
set dhcp.@dnsmasq[-1].readethers='1'
|
||||
set dhcp.@dnsmasq[-1].leasefile='/tmp/dhcp.leases'
|
||||
set dhcp.@dnsmasq[-1].noresolv='1'
|
||||
set dhcp.@dnsmasq[-1].localservice='1'
|
||||
add_list dhcp.@dnsmasq[-1].server='10.50.252.11'
|
||||
add_list dhcp.@dnsmasq[-1].server='10.50.252.0'
|
||||
add_list dhcp.@dnsmasq[-1].server='/in-addr.arpa/10.50.252.11'
|
||||
add_list dhcp.@dnsmasq[-1].server='/in-addr.arpa/10.50.252.0'
|
||||
add_list dhcp.@dnsmasq[-1].server='/ip6.arpa/10.50.252.11'
|
||||
add_list dhcp.@dnsmasq[-1].server='/ip6.arpa/10.50.252.0'
|
||||
|
||||
set dhcp.client=dhcp
|
||||
set dhcp.client.interface='client'
|
||||
|
|
Loading…
Reference in New Issue