forked from freifunk-franken/firmware
packages/fff: add new fff-dhcp package
Signed-off-by: Tim Niemeyer <tim@tn-x.org> Signed-off-by: Fabian Bläse <fabian@blaese.de> - configure router advertisements - fix package title - remove unnecessary dhcp config on first boot - lower lease time - only commit dhcp uci section Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Robert Langhammer <rlanghammer@web.de>
This commit is contained in:
parent
f8269102a5
commit
f40ff9468f
|
@ -0,0 +1,40 @@
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=fff-dhcp
|
||||||
|
PKG_VERSION:=1
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/fff-dhcp
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/fff-dhcp
|
||||||
|
SECTION:=base
|
||||||
|
CATEGORY:=Freifunk
|
||||||
|
TITLE:=Freifunk-Franken dhcp
|
||||||
|
URL:=http://www.freifunk-franken.de
|
||||||
|
DEPENDS:=+dnsmasq
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/fff-dhcp/description
|
||||||
|
This is the fff-dhcp for the Freifunk Franken Firmware
|
||||||
|
It is used to configure dnsmasq for use as gateway.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
echo "all: " > $(PKG_BUILD_DIR)/Makefile
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
# nothing
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
# nothing
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/fff-dhcp/install
|
||||||
|
$(CP) ./files/* $(1)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,fff-dhcp))
|
|
@ -0,0 +1,38 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
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.ra='server'
|
||||||
|
set dhcp.mesh.ra_management='0'
|
||||||
|
set dhcp.mesh.leasetime='1h'
|
||||||
|
EOF
|
||||||
|
|
||||||
|
uci commit dhcp
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue