root/floppyfw-3.0/scripts/dmz-udhcpd.conf.sh

Revision 269, 1.1 KB (checked in by root, 19 months ago)

Quite a few changes, new release 3.0.13 and many changes to accomodate a better VLAN setup.

  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3# $Id:$
4
5. /etc/config
6. /etc/dmz.info
7
8if [ "$DMZ_DOMAIN" ]
9  then
10    DMZ_DHCPDDOMAIN=$DMZ_DOMAIN
11  else
12    DMZ_DHCPDDOMAIN=`for DOMAINS in $(grep search /etc/resolv.conf | sed 's/^search//'); do echo $DOMAINS; break; done`
13fi
14
15# Just a default to be sure we have something.
16[ -z "$DMZ_DHCPDDOMAIN" ] && DMZ_DHCPDDOMAIN=dmz.floppyfwsecured.local
17
18echo "DMZ_DOMAIN:$DMZ_DHCPDDOMAIN" >> $DEBUG_LOG
19
20cat > /etc/dmz-udhcpd.conf <<EOF
21interface       $DMZ_DEVICE
22start           $DMZ_DHCP_RANGE_START
23end             $DMZ_DHCP_RANGE_END
24# max_leases    103
25lease_file      /var/state/dmz-udhcpd.leases
26pidfile         /var/run/dmz-udhcpd.pid
27option          dns             $DMZ_IP
28option          subnet          $DMZ_NETMASK
29option          broadcast       $DMZ_BROADCAST
30option          router          $DMZ_IP
31option          domain          $DMZ_DHCPDDOMAIN
32option          lease           864000                                   
33$OPS
34EOF
35
36# Adding the /etc/dmz-ethers file:
37# I'll use the same file for both. shouldn't matter.
38[ -f /etc/dmz-ethers ] && sed -e '/^#/d;/^$/d;s/^/static_lease /' /etc/dmz-ethers >> /etc/dmz-udhcpd.conf
Note: See TracBrowser for help on using the browser.