Update of /cvsroot/dhcp-agent/dhcp-agent/conf
In directory sc8-pr-cvs1:/tmp/cvs-serv4326
Added Files:
default.conf default.sysconf
Log Message:
moved to new names
--- NEW FILE: default.conf ---
# $Header: /cvsroot/dhcp-agent/dhcp-agent/conf/default.conf,v 1.1 2003/05/11 17:00:04 actmodern Exp $
#
# Basic DHCP client configuration script.
# We only ask for network setup parameters.
#
# Thamer Alharbash <tm...@wh...>
# This will setup dhcp to accept the following configuration
# parameters from any dhcp server:
#
# ip-address, subnet mask, lease time, renewal time, rebinding time,
# interface mtu, domain name, dns server
#
# It will require all of the above. Otherwise uncomment below to be
# more flexible
#
# IP address requests are implicit we just ask for the other options below.
#
request subnet-mask, ip-address-lease-time, renewal-time, rebinding-time,
domain-name-servers, domain-name, interface-mtu, routers;
# The require directive makes us ignore servers which do not return
# all the options we ask for. Uncomment this to accept as
# much as we get.
#
require subnet-mask, ip-address-lease-time, renewal-time, rebinding-time,
domain-name-servers, domain-name;
# Additional variable settings.
#
# Interface MTU
# Set up our default interface mtu in case the server does not
# give us one.
set default-interface-mtu = 1500;
#
# DHCP -- try to discover/request three times before giving up.
#
set dhcp-discovery-retries = 3;
#
# ICMP -- when doing ICMP retry up to three times.
#
set icmp-retries = 3;
#
# Router discovery -- should we use ICMP to find the best router?
#
enable do-measure-router-latency = no;
--- NEW FILE: default.sysconf ---
; $Header: /cvsroot/dhcp-agent/dhcp-agent/conf/default.sysconf,v 1.1 2003/05/11 17:00:05 actmodern Exp $
;
; dhcp sysconf recipe file.
;
; XXX
; IMPORTANT: You should not need to edit the interface setup below.
; Without this the client may not function properly at all.
;
(if (defined? 'dhcp-requested-ip-address)
(let
; if the mtu wasn't passed by the server, get the user configured one
((mtu
(if (defined? 'dhcp-interface-mtu)
dhcp-interface-mtu
(client-get-default-mtu client-control)))
; if the subnet mask wasn't specified, get the user configured one
(subnet-mask
(if (defined? 'dhcp-subnet-mask)
dhcp-subnet-mask
(client-get-default-subnet-mask client-control))))
; that's it we're ready to bring up the interface
(begin
(client-info-message "bringing up interface...")
(if (not (client-interface-up client-control dhcp-requested-ip-address subnet-mask mtu))
(client-fatal-message "could not bring up interface... exiting.")))))
; XXX
; Add option handling here.
;
; Domain and domain-name servers
;
(if (and (client-configure? client-control 'dhcp-domain-name-servers)
(client-configure? client-control 'dhcp-domain-name)
(defined? 'dhcp-domain-name-servers)
(defined? 'dhcp-domain-name))
(let ((resolv-conf-file-port (open "/etc/resolv.conf" O_WRONLY 0644)))
(begin
(client-info-message "configuring resolver")
(map-in-order
(lambda (dns-server)
(simple-format resolv-conf-file-port "nameserver ~A\n" dns-server)) dhcp-domain-name-servers)
(simple-format resolv-conf-file-port "search ~A\n" dhcp-domain-name)
(close-port resolv-conf-file-port))))
; Routers. We use client-set-default-route to add the route.
;
(if (and (client-configure? client-control 'dhcp-routers)
(defined? 'dhcp-routers))
(begin
(client-info-message (string-append "adding default route to: " (car dhcp-routers)))
(client-set-default-route client-control (car dhcp-routers))))
|