|
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 | |
|---|
| 8 | if [ "$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` |
|---|
| 13 | fi |
|---|
| 14 | |
|---|
| 15 | # Just a default to be sure we have something. |
|---|
| 16 | [ -z "$DMZ_DHCPDDOMAIN" ] && DMZ_DHCPDDOMAIN=dmz.floppyfwsecured.local |
|---|
| 17 | |
|---|
| 18 | echo "DMZ_DOMAIN:$DMZ_DHCPDDOMAIN" >> $DEBUG_LOG |
|---|
| 19 | |
|---|
| 20 | cat > /etc/dmz-udhcpd.conf <<EOF |
|---|
| 21 | interface $DMZ_DEVICE |
|---|
| 22 | start $DMZ_DHCP_RANGE_START |
|---|
| 23 | end $DMZ_DHCP_RANGE_END |
|---|
| 24 | # max_leases 103 |
|---|
| 25 | lease_file /var/state/dmz-udhcpd.leases |
|---|
| 26 | pidfile /var/run/dmz-udhcpd.pid |
|---|
| 27 | option dns $DMZ_IP |
|---|
| 28 | option subnet $DMZ_NETMASK |
|---|
| 29 | option broadcast $DMZ_BROADCAST |
|---|
| 30 | option router $DMZ_IP |
|---|
| 31 | option domain $DMZ_DHCPDDOMAIN |
|---|
| 32 | option lease 864000 |
|---|
| 33 | $OPS |
|---|
| 34 | EOF |
|---|
| 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 |
|---|