Adrian Schmutzler
776cfe9f86
uci-defaults scripts are supposed to be run once after firstboot and then removed. However, the removal only takes place if the subshell created for the sourced scripts returns exit code 0. For some of the files, the last command returned a different exit code, though, leading to the script remaining in its location and being executed for every boot. To prevent cases like the latter, this adds an "exit 0" to all uci-defaults files in our package store. While at it, remove the shebang for all these files since they are sourced (and not executed). Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Fabian Bläse <fabian@blaese.de>
35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
uci batch <<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.mesh=dhcp
|
|
set dhcp.mesh.interface='mesh'
|
|
set dhcp.mesh.leasetime='1h'
|
|
EOF
|
|
|
|
uci commit dhcp
|
|
|
|
exit 0
|