summaryrefslogtreecommitdiff
path: root/package/dnsmasq/files
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/dnsmasq/files
Initial import
Diffstat (limited to 'package/dnsmasq/files')
-rw-r--r--package/dnsmasq/files/dnsmasq.conf39
-rw-r--r--package/dnsmasq/files/dnsmasq.init26
2 files changed, 65 insertions, 0 deletions
diff --git a/package/dnsmasq/files/dnsmasq.conf b/package/dnsmasq/files/dnsmasq.conf
new file mode 100644
index 000000000..086a0b7f7
--- /dev/null
+++ b/package/dnsmasq/files/dnsmasq.conf
@@ -0,0 +1,39 @@
+# filter what we send upstream
+user=dnsmasq
+domain-needed
+bogus-priv
+localise-queries
+
+# allow /etc/hosts and dhcp lookups via *.lan
+local=/lan/
+domain=lan
+expand-hosts
+
+# add more dhcp-range options for every subnet
+dhcp-range=192.168.1.129,192.168.1.254,255.255.255.0,72h
+interface=lo
+interface=eth0.0
+#interface=eth1
+interface=br0
+
+# Enable dnsmasq's built-in TFTP server
+#enable-tftp
+# Set the root directory for files available via TFTP.
+#tftp-root=/tftpboot
+
+dhcp-authoritative
+dhcp-leasefile=/tmp/dhcp.leases
+
+# use /etc/ethers for static hosts
+# <hwaddr> <ipaddr>
+#read-ethers
+
+# other useful options (0.0.0.0 means server itself)
+# default route(s):
+dhcp-option=3,0.0.0.0
+# DNS server(s):
+dhcp-option=6,0.0.0.0
+# NTP server(s):
+dhcp-option=42,0.0.0.0
+# WINS server(s):
+#dhcp-option=44,0.0.0.0
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
new file mode 100644
index 000000000..e92ad3acc
--- /dev/null
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#FWINIT 50
+. /etc/rc.conf
+
+case $1 in
+(autostop) ;;
+(autostart)
+ [[ $dns_dhcp = NO ]] && exit 0
+ exec sh $0 start
+ ;;
+start)
+ [ -f /etc/dnsmasq.conf ] || exit
+ /usr/sbin/dnsmasq
+ ;;
+(stop)
+ killall dnsmasq
+ ;;
+(restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+(*)
+ echo "Usage: $0 {start | stop | restart}"
+ ;;
+esac
+exit $?