# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # isc-dhcp41-client # isc-dhcp41-client/Makefile # isc-dhcp41-client/pkg-descr # isc-dhcp41-client/pkg-plist # isc-dhcp41-client/pkg-message # isc-dhcp41-relay # isc-dhcp41-relay/Makefile # isc-dhcp41-relay/pkg-descr # isc-dhcp41-relay/pkg-message # isc-dhcp41-relay/pkg-plist # isc-dhcp41-server # isc-dhcp41-server/files # isc-dhcp41-server/files/client::scripts::freebsd # isc-dhcp41-server/files/isc-dhcpd.in # isc-dhcp41-server/files/isc-dhcrelay.in # isc-dhcp41-server/files/patch-server__Makefile.in # isc-dhcp41-server/files/patch-client__Makefile.in # isc-dhcp41-server/files/patch-client__dhclient.conf # isc-dhcp41-server/distinfo # isc-dhcp41-server/pkg-descr # isc-dhcp41-server/pkg-plist # isc-dhcp41-server/Makefile # isc-dhcp41-server/pkg-deinstall # isc-dhcp41-server/pkg-message # echo c - isc-dhcp41-client mkdir -p isc-dhcp41-client > /dev/null 2>&1 echo x - isc-dhcp41-client/Makefile sed 's/^X//' >isc-dhcp41-client/Makefile << 'bcceb0be525290a725ae0a0f81b689f1' X# Ports collection makefile for: isc-dhcp41-client X# Date created: 28 March 2010 X# Whom: Wesley Shields X# X# $FreeBSD$ X# X XCOMMENT= The ISC Dynamic Host Configuration Protocol client X XSUBSYS= client XMASTERDIR= ${.CURDIR}/../isc-dhcp41-server X X.include "${MASTERDIR}/Makefile" bcceb0be525290a725ae0a0f81b689f1 echo x - isc-dhcp41-client/pkg-descr sed 's/^X//' >isc-dhcp41-client/pkg-descr << '98d864b8cdd335c34d4c715eb3856964' XThe ISC Dynamic Host Configuration Protocol Distribution provides a Xfreely redistributable reference implementation of all aspects of the XDHCP protocol, through a suite of DHCP tools: X X * A DHCP server X * A DHCP client (this port) X * A DHCP relay agent X XWWW: http://www.isc.org/products/DHCP/ 98d864b8cdd335c34d4c715eb3856964 echo x - isc-dhcp41-client/pkg-plist sed 's/^X//' >isc-dhcp41-client/pkg-plist << '9d8fe5f2c1de39667094e77a852290c9' X@comment $FreeBSD$ Xsbin/dhclient Xsbin/dhclient-script X@unexec if cmp -s %D/etc/dhclient.conf.sample %D/etc/dhclient.conf; then rm -f %D/etc/dhclient.conf; fi Xetc/dhclient.conf.sample X@exec if [ ! -f %D/etc/dhclient.conf ] ; then cp -p %D/%F %B/dhclient.conf; fi X@exec [ -f /var/run/dhclient.leases ] || touch /var/run/dhclient.leases X@unexec [ -s /var/run/dhclient.leases ] || rm -f /var/run/dhclient.leases 9d8fe5f2c1de39667094e77a852290c9 echo x - isc-dhcp41-client/pkg-message sed 's/^X//' >isc-dhcp41-client/pkg-message << 'bd7fe2cd5275d48ff33b26b23daefb55' X**** To setup dhclient, you may need to edit /etc/rc.conf to replace the X base system dhclient, such as: X X dhcp_program="%%PREFIX%%/sbin/dhclient" X dhcp_flags="-q" X X See dhclient(8), using the following command, for details about other X possible options: X X MANPATH=%%MAN1PREFIX%%/man man 8 dhclient bd7fe2cd5275d48ff33b26b23daefb55 echo c - isc-dhcp41-relay mkdir -p isc-dhcp41-relay > /dev/null 2>&1 echo x - isc-dhcp41-relay/Makefile sed 's/^X//' >isc-dhcp41-relay/Makefile << '1c9655b2874193c24dfdae9a3e0680eb' X# Ports collection makefile for: isc-dhcp41-relay X# Date created: 28 March 2010 X# Whom: Wesley Shields X# X# $FreeBSD$ X# X XCOMMENT= The ISC Dynamic Host Configuration Protocol relay X XSUBSYS= relay XMASTERDIR= ${.CURDIR}/../isc-dhcp41-server X X.include "${MASTERDIR}/Makefile" 1c9655b2874193c24dfdae9a3e0680eb echo x - isc-dhcp41-relay/pkg-descr sed 's/^X//' >isc-dhcp41-relay/pkg-descr << '3c20f8bb58b198a952e77ef091acfce8' XThe ISC Dynamic Host Configuration Protocol Distribution provides a Xfreely redistributable reference implementation of all aspects of the XDHCP protocol, through a suite of DHCP tools: X X * A DHCP server X * A DHCP client X * A DHCP relay agent (this port) X XWWW: http://www.isc.org/products/DHCP/ 3c20f8bb58b198a952e77ef091acfce8 echo x - isc-dhcp41-relay/pkg-message sed 's/^X//' >isc-dhcp41-relay/pkg-message << '17f4271eaa3b2203f06ec49f90baf6c9' X**** This port installs dhcp relay daemon, but doesn't invoke dhcrelay by X default. If you want to invoke dhcrelay at startup, put these lines X into /etc/rc.conf. X X dhcrelay_enable="YES" X dhcrelay_flags="" # command option(s) X dhcrelay_servers="" # dhcrelay server(s) X dhcrelay_ifaces="" # ethernet interface(s) 17f4271eaa3b2203f06ec49f90baf6c9 echo x - isc-dhcp41-relay/pkg-plist sed 's/^X//' >isc-dhcp41-relay/pkg-plist << '5cb2762d3335034e3a4dd803795ada45' X@comment $FreeBSD$ X@unexec %D/etc/rc.d/isc-dhcrelay.sh forcestop 2>/dev/null || true X@unexec %D/etc/rc.d/isc-dhcrelay forcestop 2>/dev/null || true Xsbin/dhcrelay 5cb2762d3335034e3a4dd803795ada45 echo c - isc-dhcp41-server mkdir -p isc-dhcp41-server > /dev/null 2>&1 echo c - isc-dhcp41-server/files mkdir -p isc-dhcp41-server/files > /dev/null 2>&1 echo x - isc-dhcp41-server/files/client::scripts::freebsd sed 's/^X//' >isc-dhcp41-server/files/client::scripts::freebsd << '279ed59e15bcf5e2a66968227e1b5476' X#!/bin/sh X X############################################################################# X# X# Copyright (c) 1999, MindStep Corporation X# All rights reserved. X# X# Redistribution and use in source and binary forms, with or without X# modification, are permitted provided that the following conditions X# are met: X# 1. Redistributions of source code must retain the above copyright X# notice, this list of conditions and the following disclaimer. X# 2. Redistributions in binary form must reproduce the above copyright X# notice, this list of conditions and the following disclaimer in the X# documentation and/or other materials provided with the distribution. X# X# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND X# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE X# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X# SUCH DAMAGE. X# X# X############################################################################# X# X# This script was written by Patrick Bihan-Faou, patrick@mindstep.com, X# Please contact us for bug reports, etc. X# X############################################################################# X# $MindStep_Id: dhclient-script.sh,v 1.8 1999/12/07 22:11:08 patrick Exp $ X# $MindStep_Tag: CONTRIB_19991207 $ X# from FreeBSD: src/sbin/dhclient/dhclient-script.sh,v 1.2 2002/02/01 18:46:58 alfred Exp X# $FreeBSD$ X############################################################################# X X X############################################################################# X# hook functions prototypes X# X# The "pre_state_XXX_hook" functions are called before the main X# work is done for the state XXX X# X# The "post_state_XXX_hook" functions are called after the main X# work is done for the state XXX X# X# These functions are meant to be overridden by the user's X# dhclient-enter-hooks file X############################################################################# X Xpre_state_MEDIUM_hook () { } Xpre_state_PREINIT_hook () { } Xpre_state_ARPCHECK_hook () { } Xpre_state_ARPSEND_hook () { } Xpre_state_RENEW_hook () { } Xpre_state_REBIND_hook () { } Xpre_state_BOUND_hook () { } Xpre_state_REBOOT_hook () { } Xpre_state_EXPIRE_hook () { } Xpre_state_FAIL_hook () { } Xpre_state_TIMEOUT_hook () { } Xpost_state_MEDIUM_hook () { } Xpost_state_PREINIT_hook () { } Xpost_state_ARPCHECK_hook () { } Xpost_state_ARPSEND_hook () { } Xpost_state_RENEW_hook () { } Xpost_state_REBIND_hook () { } Xpost_state_BOUND_hook () { } Xpost_state_REBOOT_hook () { } Xpost_state_EXPIRE_hook () { } Xpost_state_FAIL_hook () { } Xpost_state_TIMEOUT_hook () { } X X############################################################################# X# make_resolv_conf X# X# This function is called to update the information related to the X# DNS configuration (the resolver part) X############################################################################# Xmake_resolv_conf () X{ X if [ "x$new_domain_name" != x ] && [ "x$new_domain_name_servers" != x ]; then X echo search $new_domain_name >/etc/resolv.conf X for nameserver in $new_domain_name_servers; do X echo nameserver $nameserver >>/etc/resolv.conf X done X fi X} X X############################################################################# X# set_XXX X# unset_XXX X# X# These function each deal with one particular setting. X# They are OS dependent and may be overridden in the X# dhclient-enter-hooks file if needed. X# X# These functions are called with either "new" or "old" to indicate which X# set of variables to use (new_ip_address or old_ip_address...) X# X############################################################################# X Xupdate_hostname () X{ X local current_hostname=`/bin/hostname` X X if [ "$current_hostname" = "" ] || \ X [ "$current_hostname" = "$old_host_name" ] X then X if [ "$new_host_name" != "$old_host_name" ] X then X $LOGGER "New Hostname: $new_host_name" X hostname $new_host_name X fi X fi X} X Xset_ip_address () X{ X local ip X local mask X local bcast X X if [ $# -lt 1 ] X then X return 1 X fi X X eval ip="\$${1}_ip_address" X eval mask="\$${1}_subnet_mask" X eval bcast="\$${1}_broadcast_address" X X if [ "$ip" != "" ] X then X ifconfig $interface inet $ip netmask $mask broadcast $bcast $medium X# route add $ip 127.0.0.1 > /dev/null 2>&1 X fi X} X Xunset_ip_address () X{ X local ip X X if [ $# -lt 1 ] X then X return 1 X fi X X eval ip="\$${1}_ip_address" X X if [ "$ip" != "" ] X then X ifconfig $interface inet -alias $ip $medium X# route delete $ip 127.0.0.1 > /dev/null 2>&1 X fi X} X Xset_ip_alias () X{ X if [ "$alias_ip_address" != "" ] X then X ifconfig $interface inet alias $alias_ip_address netmask $alias_subnet_mask X# route add $alias_ip_address 127.0.0.1 X fi X} X Xunset_ip_alias () X{ X if [ "$alias_ip_address" != "" ] X then X ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1 X# route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1 X fi X} X Xset_routers () X{ X local router_list X X if [ $# -lt 1 ] X then X return 1 X fi X X eval router_list="\$${1}_routers" X X for router in $router_list X do X route add default $router >/dev/null 2>&1 X done X} X Xunset_routers () X{ X local router_list X X if [ $# -lt 1 ] X then X return 1 X fi X X eval router_list="\$${1}_routers" X X for router in $router_list X do X route delete default $router >/dev/null 2>&1 X done X} X Xset_static_routes () X{ X local static_routes X X if [ $# -lt 1 ] X then X return 1 X fi X X eval static_routes="\$${1}_static_routes" X X set static_routes X X while [ $# -ge 2 ] X do X $LOGGER "New Static Route: $1 -> $2" X route add $1 $2 X shift; shift X done X} X Xunset_static_routes () X{ X local static_routes X X if [ $# -lt 1 ] X then X return 1 X fi X X eval static_routes="\$${1}_static_routes" X X set static_routes X X while [ $# -ge 2 ] X do X route delete $1 $2 X shift; shift X done X} X X############################################################################# X# X# utility functions grouping what needs to be done in logical units. X# X############################################################################# X Xset_all () X{ X set_ip_address new X set_routers new X set_static_routes new X X if [ "$new_ip_address" != "$alias_ip_address" ] X then X set_ip_alias X fi X} X Xset_others () X{ X update_hostname X make_resolv_conf X} X Xclear_arp_table () X{ X arp -d -a X} X Xunset_all () X{ X if [ "$alias_ip_address" != "$old_ip_address" ] X then X unset_ip_alias X fi X X if [ "$old_ip_address" != "" ] X then X unset_ip_address old X unset_routers old X unset_static_routes old X clear_arp_table X fi X} X Xtest_new_lease () X{ X local rc X X set $new_routers X X if [ $# -ge 1 ] X then X set_ip_address new X if ping -q -c 1 $1 X then X rc=0 X else X rc=1 X fi X unset_ip_address new X else X rc=1 X fi X return $rc X} X X############################################################################# X# Main State functions. X# X# There is a state function for each state of the DHCP client X# These functions are OS specific and should be be tampered with. X############################################################################# X Xin_state_MEDIUM () X{ X ifconfig $interface $medium X ifconfig $interface inet -alias 0.0.0.0 $medium >/dev/null 2>&1 X sleep 1 X exit_status=0 X} X Xin_state_PREINIT () X{ X unset_ip_alias X X ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \ X broadcast 255.255.255.255 up X exit_status=0 X} X Xin_state_ARPCHECK () X{ X exit_status=0 X} X Xin_state_ARPSEND () X{ X exit_status=0 X} X Xin_state_RENEW () X{ X if [ "$old_ip_address" != "$new_ip_address" ] X then X unset_all X set_all X fi X X set_others X} X Xin_state_REBIND () { X in_state_RENEW X} X Xin_state_BOUND () { X unset_all X set_all X set_others X} X Xin_state_REBOOT () { X in_state_BOUND X} X Xin_state_EXPIRE () X{ X unset_all X set_ip_alias X exit_status=0 X} X Xin_state_FAIL () { X in_state_EXPIRE X} X Xin_state_TIMEOUT () X{ X unset_all X X if test_new_lease X then X set_all X set_others X else X $LOGGER "No good lease information in TIMEOUT state" X set_ip_alias X exit_status=1 X fi X} X X############################################################################# X# Main functions: X# X# dhclient_script_init() parses the optional "enter_hooks" script which can X# override any of the state functions X# X# This function also parses the variables and notifies the detected changes. X############################################################################# Xdhclient_script_init () X{ X if [ "$new_network_number" != "" ] X then X $LOGGER "New Network Number: $new_network_number" X fi X X if [ "$new_ip_address" != "" ] X then X $LOGGER "New IP Address: $new_ip_address" X fi X X if [ "$new_broadcast_address" != "" ] X then X $LOGGER "New Broadcast Address: $new_broadcast_address" X fi X X if [ "$new_subnet_mask" != "" ] X then X $LOGGER "New Subnet Mask for $interface: $new_subnet_mask" X fi X X if [ "$alias_subnet_mask" != "" ] X then X fi X} X X############################################################################# X# dhclient_main() does the appropriate work depending on the state of X# the dhcp client X############################################################################# Xdhclient_script_main () X{ X# set -x X exit_status=0 X X case $reason in X MEDIUM|\ X PREINIT|\ X ARPCHECK|\ X ARPSEND|\ X RENEW|\ X REBIND|\ X BOUND|\ X REBOOT|\ X EXPIRE|\ X FAIL|\ X TIMEOUT) X pre_state_${reason}_hook X in_state_${reason} X post_state_${reason}_hook X ;; X *) X $LOGGER "dhclient-script called with invalid reason $reason" X exit_status=1 X ;; X esac X} X X############################################################################# X# Let's do the work... X############################################################################# X Xif [ -x /usr/bin/logger ]; then X LOGGER="/usr/bin/logger -s -p user.notice -t dhclient" Xelse X LOGGER=echo Xfi X X# Invoke the local dhcp client enter hooks, if they exist. Xif [ -x %%PREFIX%%/etc/dhclient-enter-hooks ] Xthen X exit_status=0 X . %%PREFIX%%/etc/dhclient-enter-hooks X # allow the local script to abort processing of this state X # local script must set exit_status variable to nonzero. X if [ $exit_status -ne 0 ] X then X exit $exit_status X fi Xfi X Xdhclient_script_init Xdhclient_script_main X X# Invokes the local dhcp client exit hooks, if any. Xif [ -x %%PREFIX%%/etc/dhclient-exit-hooks ]; then X . %%PREFIX%%/etc/dhclient-exit-hooks Xfi X Xexit $exit_status X X############################################################################# X# That's all folks X############################################################################# 279ed59e15bcf5e2a66968227e1b5476 echo x - isc-dhcp41-server/files/isc-dhcpd.in sed 's/^X//' >isc-dhcp41-server/files/isc-dhcpd.in << 'f4d99acf558409df5c07ab1d09c3beb4' X#! /bin/sh X# X# $FreeBSD$ X# X# PROVIDE: dhcpd X# REQUIRE: DAEMON X# BEFORE: LOGIN X# KEYWORD: shutdown X# X# Add the following line to /etc/rc.conf to enable dhcpd: X# X# dhcpd_enable="YES" X# X X. /etc/rc.subr X Xname=dhcpd Xparanoia=%%PARANOIA%% # compiled in paranoia? X Xload_rc_config ${name} X X# override these variables in /etc/rc.conf Xdhcpd_enable=${dhcpd_enable:-"NO"} X# dhcpd_flags="" # -q -early_chroot # command option(s) X# dhcpd_ifaces="" # ethernet interface(s) Xdhcpd_conf=${dhcpd_conf:-%%PREFIX%%/etc/${name}.conf} # configuration file Xdhcpd_withumask=${dhcpd_withumask:-022} # file creation mask X Xdhcpd_chuser_enable=${dhcpd_chuser_enable:-"%%PARANOIA%%"} # runs w/o privileges? Xdhcpd_withuser=${dhcpd_withuser:-${name}} # user name to run as Xdhcpd_withgroup=${dhcpd_withgroup:-${name}} # group name to run as X Xdhcpd_chroot_enable=${dhcpd_chroot_enable:-"NO"} # runs chrooted? Xdhcpd_devfs_enable=${dhcpd_devfs_enable:-"YES"} # devfs if available? Xdhcpd_rootdir=${dhcpd_rootdir:-/var/db/${name}} # directory to run in X# dhcpd_includedir="" # directory for included config files X Xsafe_run () # rc command [args...] X{ X local _rc X X _rc=$1 X shift X X if [ "${_rc}" -eq 0 ]; then X debug safe_run: "$@" X "$@" || _rc=1 X else X warn safe_run: "$@" X fi X return ${_rc} X} X Xprecious () # entry... X{ X local _entry _rc X X _rc=0 X for _entry; do X # do nothing if /dev, /var/run or /var/db X echo ${_entry} | egrep -q '^//*(dev|var//*(run|db))?/*$' || _rc=1 X done X debug precious: "$@" rc=${_rc} X return ${_rc} X} X Xlsmod () # user group file... X{ X local _entry _user _group _rc X X _user=$1 _group=$2 X shift 2 X X _rc=0 X for _entry; do X ls -ld ${_entry} 2> /dev/null | X awk -v u=${_user} -v g=${_group} '{ X exit ((u && $3 != u) || (g && $4 != g)) X }' || _rc=1 X done X debug lsmod: "$@" rc=${_rc} X return ${_rc} X} X Xsafe_chmog () # entry... X{ X local _entry _user _group _usergroup _rc X X _user=${dhcpd_withuser} X _group=${dhcpd_withgroup} X X _rc=0 X if [ -n "${_user}" -o -n "${_group}" ]; then X _usergroup=${_user}${_group:+:${_group}} X for _entry; do X if [ -d ${_entry} ] && mounted ${_entry}; then X continue X fi X if [ -e ${_entry} ] && X ! precious ${_entry} && X ! lsmod ${_user} ${_group} ${_entry} && X ! safe_run ${_rc} chown ${_usergroup} ${_entry}; then X warn "unable to change permissions of ${_entry}" X _rc=1 X fi X done X fi X return ${_rc} X} X Xsafe_mkdir () # dir... X{ X local _dir _rc X X _rc=0 X for _dir; do X if [ ! -d ${_dir} ] && X ! precious ${_dir} && X ! safe_run ${_rc} mkdir -p ${_dir}; then X err 1 "unable to create directory ${_dir}" X _rc=1 X fi X done X safe_run ${_rc} safe_chmog "$@" || _rc=1 X return ${_rc} X} X Xsafe_rmdir () # dir... X{ X local _dir _rc X X _rc=0 X for _dir; do X if [ -d ${_dir} ] && X ! precious ${_dir} && X ! mounted ${_dir}; then X if safe_run ${_rc} rmdir ${_dir}; then X safe_run ${_rc} safe_rmdir ${_dir%/*} || _rc=1 X else X warn "unable to remove directory ${_dir}" X _rc=1 X fi X fi X done X return ${_rc} X} X Xsafe_touch () # file... X{ X local _file _rc X X _rc=0 X for _file; do X if [ ! -e ${_file} ] && X ! safe_run ${_rc} touch ${_file}; then X err 1 "unable to create file ${_file}" X _rc=1 X fi X done X safe_run ${_rc} safe_chmog "$@" || _rc=1 X return ${_rc} X} X Xsafe_remove () # entry... X{ X local _entry _rc X X _rc=0 X for _entry; do X if [ -f ${_entry} ]; then X if ! safe_run ${_rc} rm -f ${_entry}; then X warn "unable to remove file ${_entry}" X _rc=1 X fi X elif [ -d ${_entry} ] && X ! precious ${_entry} && X ! mounted ${_entry}; then X if ! safe_run ${_rc} rm -rf ${_entry}; then X warn "unable to remove directory ${_entry}" X _rc=1 X fi X fi X done X return ${_rc} X} X Xsafe_copy () # src dst X{ X local _src _dst _rc X X _src=$1 _dst=$2 X X _rc=0 X if [ -f ${_src} ]; then X if ! safe_run ${_rc} safe_remove ${_dst} || X ! safe_run ${_rc} cp -p ${_src} ${_dst}; then X err 1 "unable to copy file ${_src} to ${_dst}" X _rc=1 X fi X safe_run ${_rc} safe_chmog ${_dst} || _rc=1 X elif [ -d ${_src} ] && X ! precious ${_dst} && X ! mounted ${_dst}; then X if ! safe_run ${_rc} pax -rw -pe -ts "|^${_src}||" \ X ${_src} ${_dst}; then X err 1 "unable to copy directory ${_src} to ${_dst}" X _rc=1 X fi X else X err 1 "unable to copy ${_src} to ${_dst}" \ X "-- not a file or a directory" X _rc=1 X fi X return ${_rc} X} X Xmounted () # dir... X{ X local _rc X X _rc=1 X if checkyesno dhcpd_devfs_enable; then X mount -t devfs | awk ' X BEGIN { n = ARGC; ARGC = 2 } X { for (i = 2; i != n; i++) if ($3 == ARGV[i]) exit 1 } X ' - "$@" || _rc=0 X fi X debug mounted: "$@" rc=${_rc} X return ${_rc} X} X Xsafe_mount () # dir X{ X local _dir _rc X X _dir=$1 X X _rc=0 X if checkyesno dhcpd_devfs_enable && X ! mounted ${_dir} && X ! safe_run ${_rc} mount -t devfs devfs ${_dir}; then X err 1 "unable to mount ${_dir}" X _rc=1 X fi X return ${_rc} X} X Xsafe_umount () # dir X{ X local _dir _rc X X _dir=$1 X X _rc=0 X if checkyesno dhcpd_devfs_enable && X mounted ${_dir} && X ! safe_run ${_rc} umount ${_dir}; then X warn "unable to unmount ${_dir}" X _rc=1 X fi X return ${_rc} X} X Xcheck_chuser () X{ X if checkyesno paranoia; then X if checkyesno dhcpd_chuser_enable && X [ -z "${dhcpd_withuser}" -a -z "${dhcpd_withgroup}" ]; then X err 1 "one of dhcpd_withuser and dhcpd_withgroup" \ X "must be set if dhcpd_chuser_enable is enabled" X fi X else X if checkyesno dhcpd_chuser_enable; then X warn "dhcpd_chuser_enable disabled -- not compiled in" X dhcpd_chuser_enable=NO X fi X fi X} X Xcheck_chroot () X{ X if checkyesno paranoia; then X if checkyesno dhcpd_chroot_enable; then X if [ -z "${dhcpd_rootdir}" ]; then X err 1 "dhcpd_rootdir must be set" \ X "if dhcpd_chroot_enable is enabled" X fi X if test `uname -r | cut -c 1` -le 6; then X if checkyesno dhcpd_devfs_enable && X ! ( type mount_devfs ) > /dev/null 2>&1; X then X warn "dhcpd_devfs_enable disabled" \ X "-- not available" X dhcpd_devfs_enable=NO X fi X fi X else X dhcpd_devfs_enable=NO X fi X else X if checkyesno dhcpd_chroot_enable; then X warn "dhcpd_chroot_enable disabled -- not compiled in" X dhcpd_chroot_enable=NO X fi X dhcpd_devfs_enable=NO X fi X} X Xrcvar_chuser () X{ X if checkyesno paranoia && checkyesno dhcpd_chuser_enable; then X dhcpd_piddir=${__dhcpd_piddir}/${name} X dhcpd_leasesdir=${__dhcpd_leasesdir}/${name} X else X dhcpd_withuser= dhcpd_withgroup= X fi X} X Xrcvar_chroot () X{ X if ! checkyesno paranoia || ! checkyesno dhcpd_chroot_enable; then X dhcpd_rootdir= X elif checkyesno paranoia && checkyesno dhcpd_chroot_enable; then X dhcpd_devdir=${__dhcpd_devdir} X dhcpd_etcdir=${__dhcpd_etcdir} X fi X} X Xrcvar_pidnleases () X{ X if ! checkyesno dhcpd_chuser_enable; then X dhcpd_piddir=${__dhcpd_piddir} X dhcpd_leasesdir=${__dhcpd_leasesdir} X fi X dhcpd_pidfile=${dhcpd_piddir}/${name}.pid X dhcpd_leasesfile=${dhcpd_leasesdir}/${name}.leases X dhcpd_conffile=${dhcpd_conf} # for convenience only X dhcpd_confdir=$(dirname ${dhcpd_conffile}) X} X Xrcvar_rooted () X{ X _dhcpd_rootdir=${dhcpd_rootdir} X _dhcpd_devdir=${dhcpd_rootdir}${dhcpd_devdir} X _dhcpd_etcdir=${dhcpd_rootdir}${dhcpd_etcdir} X _dhcpd_confdir=${dhcpd_rootdir}${dhcpd_confdir} X _dhcpd_includedir=${dhcpd_rootdir}${dhcpd_includedir} X _dhcpd_piddir=${dhcpd_rootdir}${dhcpd_piddir} X _dhcpd_leasesdir=${dhcpd_rootdir}${dhcpd_leasesdir} X _dhcpd_conffile=${dhcpd_rootdir}${dhcpd_conffile} X _dhcpd_pidfile=${dhcpd_rootdir}${dhcpd_pidfile} X _dhcpd_leasesfile=${dhcpd_rootdir}${dhcpd_leasesfile} X} X Xsetup_umask () X{ X if [ -n "${dhcpd_withumask}" ]; then X umask ${dhcpd_withumask} X fi X} X Xsetup_chroot () X{ X local _hconf _hosts _ltime _rconf X X _hconf=host.conf X _hosts=hosts X _ltime=localtime X _rconf=resolv.conf X X if checkyesno paranoia && checkyesno dhcpd_chroot_enable; then X if ! mounted ${_dhcpd_devdir}; then X safe_mkdir ${_dhcpd_devdir}/_ X # XXX /_ hack! so, .../dev is root owned. X fi X safe_mkdir ${_dhcpd_rootdir} ${_dhcpd_etcdir}/_ ${_dhcpd_confdir} X # XXX /_ hack! so, .../etc is root owned. X if checkyesno dhcpd_devfs_enable; then X safe_mount ${_dhcpd_devdir} X else X safe_copy ${dhcpd_devdir} ${_dhcpd_devdir} X fi X safe_copy ${dhcpd_conffile} ${_dhcpd_conffile} X safe_copy ${dhcpd_etcdir}/$_hconf ${_dhcpd_etcdir}/$_hconf X safe_copy ${dhcpd_etcdir}/$_hosts ${_dhcpd_etcdir}/$_hosts X safe_copy ${dhcpd_etcdir}/$_ltime ${_dhcpd_etcdir}/$_ltime X safe_copy ${dhcpd_etcdir}/$_rconf ${_dhcpd_etcdir}/$_rconf X # copy dhcpd_includedir if defined and available X if [ -d "${dhcpd_includedir}" ]; then X safe_mkdir ${_dhcpd_includedir} X safe_copy ${dhcpd_includedir} ${_dhcpd_includedir} X fi X fi X} X Xsetup_chuser () X{ X if checkyesno paranoia && { X checkyesno dhcpd_chuser_enable || checkyesno dhcpd_chroot_enable X }; then X safe_mkdir ${_dhcpd_piddir} ${_dhcpd_leasesdir} X fi X} X Xsetup_leases () X{ X safe_touch ${_dhcpd_leasesfile} X} X Xsetup_flags () X{ X if [ -n "${dhcpd_conf}" ]; then X rc_flags="${rc_flags} -cf ${dhcpd_conf}" X fi X if [ -n "${dhcpd_leasesfile}" ]; then X rc_flags="${rc_flags} -lf ${dhcpd_leasesfile}" X fi X if [ -n "${dhcpd_pidfile}" ]; then X rc_flags="${rc_flags} -pf ${dhcpd_pidfile}" X fi X if [ -n "${dhcpd_withuser}" ]; then X rc_flags="${rc_flags} -user ${dhcpd_withuser}" X fi X if [ -n "${dhcpd_withgroup}" ]; then X rc_flags="${rc_flags} -group ${dhcpd_withgroup}" X fi X if [ -n "${dhcpd_rootdir}" ]; then X rc_flags="${rc_flags} -chroot ${dhcpd_rootdir}" X fi X rc_flags="${rc_flags} ${dhcpd_ifaces}" X} X Xcleanup_chroot () X{ X if checkyesno paranoia && checkyesno dhcpd_chroot_enable; then X safe_umount ${_dhcpd_devdir} X fi X} X Xdhcpd_stop () X{ X if sh $0 forcestatus; then X sh $0 forcestop X fi X} X Xremove_pid () X{ X if [ -e ${_dhcpd_pidfile} ]; then X warn "${_dhcpd_pidfile} still exists! -- removing anyway" X fi X safe_remove ${_dhcpd_pidfile} X} X Xremove_leases () X{ X if [ -s ${_dhcpd_leasesfile} ]; then X warn "${_dhcpd_leasesfile} not empty -- not removed --" \ X "futher warning messages expected, don't care." X else X safe_remove ${_dhcpd_leasesfile} ${_dhcpd_leasesfile}~ X fi X} X Xremove_chuser () X{ X if checkyesno paranoia && { X checkyesno dhcpd_chuser_enable || checkyesno dhcpd_chroot_enable X }; then X safe_rmdir ${_dhcpd_piddir} ${_dhcpd_leasesdir} X fi X} X Xremove_chroot () X{ X if checkyesno paranoia && checkyesno dhcpd_chroot_enable; then X safe_remove ${_dhcpd_conffile} ${_dhcpd_includedir} \ X ${_dhcpd_etcdir} X if checkyesno dhcpd_devfs_enable; then X safe_umount ${_dhcpd_devdir} X safe_rmdir ${_dhcpd_devdir}/_ # XXX /_ hack! X else X safe_remove ${_dhcpd_devdir} X fi X safe_rmdir ${_dhcpd_confdir} ${_dhcpd_rootdir} # XXX /_ hack! X fi X} X Xdhcpd_check () X{ X check_chuser X check_chroot X} X Xdhcpd_rcvar () X{ X rcvar_chuser X rcvar_chroot X rcvar_pidnleases X rcvar_rooted X} X Xdhcpd_precmd () X{ X setup_umask X setup_chroot X setup_chuser X setup_leases X setup_flags X} X Xdhcpd_postcmd () X{ X cleanup_chroot X} X X_dhcpd_uninstall () # user group root X{ X local _user _group _root X X _user=$1 _group=$2 _root=$3 X X if [ -n "${_user}" -o -n "${_group}" ]; then X dhcpd_chuser_enable=YES X dhcpd_withuser=${_user} X dhcpd_withgroup=${_group} X else X dhcpd_chuser_enable=NO X fi X if [ -n "${_root}" ]; then X dhcpd_chroot_enable=YES X dhcpd_rootdir=${_root} X else X dhcpd_chroot_enable=NO X fi X dhcpd_check X dhcpd_rcvar X dhcpd_uninstall X} X Xdhcpd_uninstall () X{ X if checkyesno __dhcpd_uninstall; then X dhcpd_stop X remove_pid X remove_leases X remove_chuser X remove_chroot X else X local _user _group _root X X __dhcpd_uninstall=YES X X _user=${dhcpd_withuser} X _group=${dhcpd_withgroup} X _root=${dhcpd_rootdir} X X _dhcpd_uninstall "" "" "" X X if checkyesno paranoia; then X if [ -n "${_user}" -o -n "${_group}" ]; then X _dhcpd_uninstall "${_user}" "${_group}" "" X fi X if [ -n "${_root}" ]; then X _dhcpd_uninstall "" "" "${_root}" X fi X if [ -n "${_user}" -o -n "${_group}" ] && X [ -n "${_root}" ]; then X _dhcpd_uninstall "${_user}" "${_group}" "${_root}" X fi X fi X fi X} X Xdhcpd_checkconfig () X{ X local rc_flags_mod X setup_flags X rc_flags_mod="$rc_flags" X # Eliminate '-q' flag if it is present X case "$rc_flags" in X *-q*) rc_flags_mod=`echo "${rc_flags}" | sed -Ee 's/(^-q | -q | -q$)//'` ;; X esac X if ! ${command} -t -q ${rc_flags_mod}; then X err 1 "`${command} -t ${rc_flags_mod}` Configuration file sanity check failed" X fi X} X Xrcvar=${name}_enable Xload_rc_config ${name} X X__dhcpd_uninstall="NO" # internal use only X__dhcpd_devdir=/dev # devices directory X__dhcpd_etcdir=/etc # etc directory X__dhcpd_piddir=/var/run # pid file directory X__dhcpd_leasesdir=/var/db # leases file directory X#__dhcpd_rootdir=/var/db/${name} # root directory X Xdhcpd_check Xdhcpd_rcvar X Xcommand=%%PREFIX%%/sbin/${name} Xpidfile=${_dhcpd_pidfile} Xrequired_files=${dhcpd_conf} Xstart_precmd=${name}_precmd Xstop_postcmd=${name}_postcmd Xrestart_precmd="dhcpd_checkconfig" Xuninstall_cmd=dhcpd_uninstall Xextra_commands="uninstall" X Xrun_rc_command "$1" f4d99acf558409df5c07ab1d09c3beb4 echo x - isc-dhcp41-server/files/isc-dhcrelay.in sed 's/^X//' >isc-dhcp41-server/files/isc-dhcrelay.in << 'f44b276c64c66eb14beea616038c41f6' X#! /bin/sh X# X# $FreeBSD: ports/net/isc-dhcp31-server/files/isc-dhcrelay.in,v 1.3 2010/03/27 00:13:46 dougb Exp $ X# X# PROVIDE: dhcrelay X# REQUIRE: DAEMON X# X# Add the following line to /etc/rc.conf to enable dhcrelay: X# X# dhcrelay_enable="YES" X# X X# override these variables in /etc/rc.conf Xdhcrelay_enable=${dhcrelay_enable:-"NO"} X# dhcrelay_flags="" # command option(s) X# dhcrelay_servers="" # dhcrelay server(s) X# dhcrelay_ifaces="" # ethernet interface(s) X Xdhcrelay_precmd () X{ X local ifaces X X if [ -z "${dhcrelay_servers}" ]; then X err 1 "no dhcrelay server(s) configured." X fi X X ifaces= X for iface in ${dhcrelay_ifaces}; do X ifaces="${ifaces} -i ${iface}" X done X X rc_flags="${rc_flags} ${ifaces} ${dhcrelay_servers}" X} X X. /etc/rc.subr X Xname=dhcrelay Xrcvar=${name}_enable X Xcommand=%%PREFIX%%/sbin/${name} Xpidfile=/var/run/${name}.pid Xstart_precmd=${name}_precmd X Xload_rc_config ${name} Xrun_rc_command "$1" f44b276c64c66eb14beea616038c41f6 echo x - isc-dhcp41-server/files/patch-server__Makefile.in sed 's/^X//' >isc-dhcp41-server/files/patch-server__Makefile.in << '26f1de8be48ec9fd8374e0bf020f4b9e' X--- ./server/Makefile.in.orig 2010-01-07 19:47:06.000000000 -0500 X+++ ./server/Makefile.in 2010-05-02 20:38:26.000000000 -0400 X@@ -370,8 +370,8 @@ X @list='$(dist_sysconf_DATA)'; for p in $$list; do \ X if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ X f=$(am__strip_dir) \ X- echo " $(dist_sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \ X- $(dist_sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \ X+ echo " $(dist_sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f.sample'"; \ X+ $(dist_sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f.sample"; \ X done X X uninstall-dist_sysconfDATA: 26f1de8be48ec9fd8374e0bf020f4b9e echo x - isc-dhcp41-server/files/patch-client__Makefile.in sed 's/^X//' >isc-dhcp41-server/files/patch-client__Makefile.in << '645636ee2a774f715644d92af3320dcc' X--- ./client/Makefile.in.orig 2010-01-07 19:47:06.000000000 -0500 X+++ ./client/Makefile.in 2010-05-02 20:38:26.000000000 -0400 X@@ -351,8 +351,8 @@ X @list='$(dist_sysconf_DATA)'; for p in $$list; do \ X if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ X f=$(am__strip_dir) \ X- echo " $(dist_sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \ X- $(dist_sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \ X+ echo " $(dist_sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f.sample'"; \ X+ $(dist_sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f.sample"; \ X done X X uninstall-dist_sysconfDATA: 645636ee2a774f715644d92af3320dcc echo x - isc-dhcp41-server/files/patch-client__dhclient.conf sed 's/^X//' >isc-dhcp41-server/files/patch-client__dhclient.conf << '1cc69793f9a3f5e9040f110dc25ec27b' X--- ./client/dhclient.conf.orig 2010-05-02 20:39:06.000000000 -0400 X+++ ./client/dhclient.conf 2010-05-02 20:39:16.000000000 -0400 X@@ -11,7 +11,7 @@ X reboot 10; X select-timeout 5; X initial-interval 2; X-script "/etc/dhclient-script"; X+script "%%PREFIX%%/sbin/dhclient-script"; X media "-link0 -link1 -link2", "link0 link1"; X reject 192.33.137.209; X 1cc69793f9a3f5e9040f110dc25ec27b echo x - isc-dhcp41-server/distinfo sed 's/^X//' >isc-dhcp41-server/distinfo << '1c44e9f5c5c1054979af23eeb492fc39' XMD5 (dhcp-4.1.1.tar.gz) = 38a74c89d8913b9b5f33737047623c18 XSHA256 (dhcp-4.1.1.tar.gz) = 37058685bffbfeb793cfb0867f0b1911f8d238ea69fbaa6cbb165455ab803618 XSIZE (dhcp-4.1.1.tar.gz) = 1084368 1c44e9f5c5c1054979af23eeb492fc39 echo x - isc-dhcp41-server/pkg-descr sed 's/^X//' >isc-dhcp41-server/pkg-descr << '514ba1aac24df6bbca85cbbbc22b6779' XThe ISC Dynamic Host Configuration Protocol Distribution provides a Xfreely redistributable reference implementation of all aspects of the XDHCP protocol, through a suite of DHCP tools: X X * A DHCP server (this port) X * A DHCP client X * A DHCP relay agent X XWWW: http://www.isc.org/products/DHCP/ 514ba1aac24df6bbca85cbbbc22b6779 echo x - isc-dhcp41-server/pkg-plist sed 's/^X//' >isc-dhcp41-server/pkg-plist << '56e5a5245aea56d57a7776f2fa5a1462' X@comment $FreeBSD$ X@unexec %D/etc/rc.d/isc-dhcpd forcestop 2>/dev/null || true X@unexec if cmp -s %D/etc/dhcpd.conf.sample %D/etc/dhcpd.conf; then rm -f %D/etc/dhcpd.conf; fi Xetc/dhcpd.conf.sample X@exec if [ ! -f %D/etc/dhcpd.conf ] ; then cp -p %D/%F %B/dhcpd.conf; fi Xsbin/dhcpd 56e5a5245aea56d57a7776f2fa5a1462 echo x - isc-dhcp41-server/Makefile sed 's/^X//' >isc-dhcp41-server/Makefile << 'ef79b37aa2afc64e36277c2b988d7caa' X# Ports collection makefile for: isc-dhcp41-server X# Date created: 28 March 2010 X# Whom: Wesley Shields X# X# $FreeBSD$ X# X XPORTNAME= dhcp XPORTVERSION= 4.1.1 XPORTREVISION= ${DHCP_PORTREVISION} XCATEGORIES= net XMASTER_SITES= ${MASTER_SITE_ISC} XMASTER_SITE_SUBDIR= dhcp XPKGNAMEPREFIX= isc- XPKGNAMESUFFIX= 41-${SUBSYS} XDISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} X XMAINTAINER= wxs@FreeBSD.org XCOMMENT?= The ISC Dynamic Host Configuration Protocol server X XPORTREVISION_SERVER= 0 XPORTREVISION_CLIENT= 0 XPORTREVISION_RELAY= 0 XPORTREVISION_DEVEL= 0 X XSUBSYS?= server X XUNIQUENAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} X X.if ${SUBSYS} == server XOPTIONS= DHCP_PARANOIA "Enable support for chroot" on X.endif X X# PORTREVISION handling X.if ${SUBSYS} == client XDHCP_PORTREVISION= ${PORTREVISION_CLIENT} X.elif ${SUBSYS} == relay XDHCP_PORTREVISION= ${PORTREVISION_RELAY} X.else XDHCP_PORTREVISION= ${PORTREVISION_SERVER} X.endif X X.if ${SUBSYS} == server XUSERS= dhcpd XGROUPS= dhcpd X.endif X X.include X XMAN_COMPRESSED= no XGNU_CONFIGURE= yes XSCRIPTS_ENV+= PKG_PREFIX=${PREFIX} X X.if ${SUBSYS} == client XMAN5= dhclient.conf.5 dhclient.leases.5 XMAN8= dhclient.8 dhclient-script.8 XCONF_FILE= dhclient.conf X.elif ${SUBSYS} == server XCONFIGURE_ARGS+= --localstatedir=/var XMAN5= dhcpd.conf.5 dhcpd.leases.5 XMAN8= dhcpd.8 XCONF_FILE= dhcpd.conf X.elif ${SUBSYS} == relay XMAN8= dhcrelay.8 X.else XMAN3= dhcpctl.3 omapi.3 X.endif X XDESCR= ${.CURDIR}/pkg-descr XPLIST= ${.CURDIR}/pkg-plist X X.if ${SUBSYS} == server XUSE_RC_SUBR= isc-dhcpd X.elif ${SUBSYS} == relay XUSE_RC_SUBR= isc-dhcrelay X.endif X XSCHEMA_DIR= ${PREFIX}/share/${PKGBASE} XDOCSDIR= ${PREFIX}/share/doc/${PKGBASE} XDATADIR= /var/db X XMSG_FILE= ${.CURDIR}/pkg-message XPKGMESSAGE= ${WRKDIR}/pkg-message X XREINPLACE_SUB= PREFIX="${PREFIX}" XPKGMESSAGE_SUB= PREFIX="${PREFIX}" MAN1PREFIX="${MAN1PREFIX}" \ X DOCSDIR="${DOCSDIR}" X X.if defined(WITH_DHCP_PARANOIA) XCONFIGURE_ARGS+= --enable-paranoia --enable-early-chroot XSUB_LIST+= PARANOIA=yes X.else XSUB_LIST+= PARANOIA=no X.endif X Xpost-extract: X @${CP} ${FILESDIR}/client::scripts::freebsd ${WRKSRC}/client/scripts/freebsd X Xpost-patch: X @${SED} ${PKGMESSAGE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ X ${MSG_FILE} > ${PKGMESSAGE} X @${REINPLACE_CMD} ${REINPLACE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ X ${WRKSRC}/client/dhclient.conf \ X ${WRKSRC}/client/scripts/freebsd X Xdo-install: X ${MAKE} -C ${WRKSRC}/${SUBSYS} install X Xpost-install: X.if defined(CONF_FILE) X if [ ! -f ${PREFIX}/etc/${CONF_FILE} ]; then \ X ${CP} -p ${PREFIX}/etc/${CONF_FILE}.sample ${PREFIX}/etc/${CONF_FILE} ; \ X fi X.endif X.if ${SUBSYS} == client X ${INSTALL_SCRIPT} ${WRKSRC}/client/scripts/freebsd ${PREFIX}/sbin/dhclient-script X.endif X @${ECHO_MSG} X @${CAT} ${PKGMESSAGE} X @${ECHO_MSG} X X.include ef79b37aa2afc64e36277c2b988d7caa echo x - isc-dhcp41-server/pkg-deinstall sed 's/^X//' >isc-dhcp41-server/pkg-deinstall << '109279a79c5fd108e77b3a4c843d82df' X#!/bin/sh X# X# $FreeBSD$ X# X X[ $# != 2 ] && exit 1 X[ -z "${PKG_PREFIX}" ] && exit 1 X[ -n "${BATCH}" ] && exit 0 X Xcase $2 in XDEINSTALL) X if [ -x ${PKG_PREFIX}/etc/rc.d/isc-dhcpd ]; then X ${PKG_PREFIX}/etc/rc.d/isc-dhcpd forceuninstall X fi X ;; XPOST-DEINSTALL) X ;; X*) X echo "usage: $0 {DEINSTALL|POST-DEINSTALL}" >&2 X exit 1 X ;; Xesac 109279a79c5fd108e77b3a4c843d82df echo x - isc-dhcp41-server/pkg-message sed 's/^X//' >isc-dhcp41-server/pkg-message << '45ff71dc21cd3c9436fc988d76205671' X**** To setup dhcpd, please edit %%PREFIX%%/etc/dhcpd.conf. X X**** This port installs dhcp daemon, but doesn't invoke dhcpd by default. If X you want to invoke dhcpd at startup, put these lines into /etc/rc.conf. X X dhcpd_enable="YES" # dhcpd enabled? X dhcpd_flags="-q" # command option(s) X dhcpd_conf="%%PREFIX%%/etc/dhcpd.conf" # configuration file X dhcpd_ifaces="" # ethernet interface(s) X dhcpd_withumask="022" # file creation mask X X**** If compiled with paranoia support (the default), the following lines X are also supported: X X dhcpd_chuser_enable="YES" # runs w/o privileges? X dhcpd_withuser="dhcpd" # user name to run as X dhcpd_withgroup="dhcpd" # group name to run as X dhcpd_chroot_enable="YES" # runs chrooted? X dhcpd_devfs_enable="YES" # use devfs if available? X dhcpd_rootdir="/var/db/dhcpd" # directory to run in X dhcpd_includedir="" # directory with config- X files to include X X**** WARNING: never edit the chrooted or jailed dhcpd.conf file but X %%PREFIX%%/etc/dhcpd.conf instead which is always copied where X needed upon startup. X X**** WARNING: %%PREFIX%%/etc/rc.isc-dhcpd.conf is obsolete. rc.conf like X variables are no longer read from there. Also, the dhcpd_options X variable is obsolete. Use dhcpd_flags instead. 45ff71dc21cd3c9436fc988d76205671 exit