root/floppyfw-3.0/scripts/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.

Line 
1#!/bin/sh
2
3# $Id: udhcpd.conf.sh,v 1.6 2004/11/13 13:10:42 thomasez Exp $
4
5. /etc/config
6. /etc/inside.info
7
8if [ "$DOMAIN" ]
9  then
10    DHCPDDOMAIN=$DOMAIN
11  else
12    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 "$DHCPDDOMAIN" ] && DHCPDDOMAIN=floppyfwsecured.local
17
18echo "DOMAIN:$DHCPDDOMAIN" >> $DEBUG_LOG
19
20cat > /etc/udhcpd.conf <<EOF
21interface       $INSIDE_DEVICE
22start           $DHCP_RANGE_START
23end             $DHCP_RANGE_END
24# max_leases    103
25lease_file      /var/state/udhcpd.leases
26pidfile         /var/run/udhcpd.pid
27option          dns             $INSIDE_IP
28option          subnet          $INSIDE_NETMASK
29option          broadcast       $INSIDE_BROADCAST
30option          router          $INSIDE_IP
31option          domain          $DHCPDDOMAIN
32option          lease           864000                                   
33$OPS
34EOF
35
36# Adding the /etc/ethers file:
37[ -f /etc/ethers ] && sed -e '/^#/d;/^$/d;s/^/static_lease /' /etc/ethers >> /etc/udhcpd.conf
Note: See TracBrowser for help on using the browser.