From root@ns1.gayagenda.net  Sun Sep  2 15:14:35 2001
Return-Path: <root@ns1.gayagenda.net>
Received: from ns1.gayagenda.net (cpe-66-1-148-96.ca.sprintbbd.net [66.1.148.96])
	by hub.freebsd.org (Postfix) with ESMTP id BAA4537B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  2 Sep 2001 15:14:34 -0700 (PDT)
Received: (from root@localhost)
	by ns1.gayagenda.net (8.11.6/8.11.6) id f82MEX902579;
	Sun, 2 Sep 2001 15:14:33 -0700 (PDT)
	(envelope-from root)
Message-Id: <200109022214.f82MEX902579@ns1.gayagenda.net>
Date: Sun, 2 Sep 2001 15:14:33 -0700 (PDT)
From: Nick Johnson <freebsd@spatula.net>
Reply-To: Nick Johnson <freebsd@spatula.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: isc-dhcp3 port out of date 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         30274
>Category:       ports
>Synopsis:       isc-dhcp3 port out of date
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 02 15:20:01 PDT 2001
>Closed-Date:    Sat Oct 6 06:38:23 PDT 2001
>Last-Modified:  Sat Oct 06 06:38:52 PDT 2001
>Originator:     Nick Johnson
>Release:        FreeBSD 4.4-20010827-RC2 i386
>Organization:
Spatula Systems 
>Environment:
System: FreeBSD ns1.gayagenda.net 4.4-20010827-RC2 FreeBSD 4.4-20010827-RC2 #0: Mon Aug 27 20:53:32 PDT 2001 murray@ref4:/usr/src/sys/compile/GENERIC i386


	
>Description:
isc-dhcp3-r11 is no longer available.  r12 is available.  Just an update
for the md5 and makefile
	
>How-To-Repeat:
cd /usr/ports/net/isc-dhcp3 && make
	
>Fix:

Wouldn't it be nice to get this into 4.4-RELEASE?
 
Patches to the port:

--- Makefile.old	Sun Sep  2 15:07:09 2001
+++ Makefile	Sun Sep  2 15:04:00 2001
@@ -7,7 +7,7 @@
 #
 
 PORTNAME=	dhcp
-PORTVERSION=	3.0.r11
+PORTVERSION=	3.0.r12
 CATEGORIES=	net
 MASTER_SITES=	ftp://ftp.isc.org/isc/%SUBDIR%/ \
 		${US_MASTER_SITES} ${JAPAN_MASTER_SITES} \

--- distinfo.old	Sun Sep  2 15:06:41 2001
+++ distinfo	Sun Sep  2 15:06:43 2001
@@ -1 +1 @@
-MD5 (dhcp-3.0rc11.tar.gz) = 6b244e2bb056d423a49aca7b6bbeee91
+MD5 (dhcp-3.0rc12.tar.gz) = 7aa34ef3cd4a24f0c6857283d5261003
	
>Release-Note:
>Audit-Trail:

From: Pete Fritchman <petef@databits.net>
To: Nick Johnson <freebsd@spatula.net>
Cc: FreeBSD-gnats-submit@freebsd.org, clefevre@citeweb.net
Subject: Re: ports/30274: isc-dhcp3 port out of date
Date: Sun, 2 Sep 2001 18:30:37 -0400

 ++ 02/09/01 15:14 -0700 - Nick Johnson:
 | >Synopsis:       isc-dhcp3 port out of date
 
 What does the maintainer think about this?
 
 --
 Pete Fritchman <petef@databits.net>
 finger petef@databits.net for PGP key

From: Cyrille Lefevre <root@gits.dyndns.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc: "David W. Chapman Jr." <dwcjr@inethouston.net>,
	Nick Johnson <freebsd@spatula.net>,
	Pete Fritchman <petef@databits.net>
Subject: Re: ports/30274: isc-dhcp3 port out of date
Date: Thu, 6 Sep 2001 08:59:27 +0200 (CEST)

 Sorry for the late answer, I thought I already update this port.
 
 Description:
 
 	Makefile
 		PORTVERSION bumped to 3.0.r12.
 		PLIST_SUB removed.
 		PKGMESSAGE added.
 		targets reworked a lot.
 
 	distinfo
 		updated.
 
 	pkg-message
 		new file.
 
 	pkg-plist
 		simplified a lot.
 
 	files/isc-dhcpd.sh.sample
 		enhanced a lot to read startup options from
 		etc/rc.isc-dhcpd.conf.
 		program and config files checking added.
 		messages logged through syslog.
 
 	files/patch-freebsd
 		!!PREFIX!! replaced by %%PREFIX%% to be more homogeneous.
 
 	files/isc-dhcrelay.sh.sample
 	files/rc.isc-dhcrelay.conf.sample
 		new files.
 
 How-To-Repeat:
 	n/a
 Fix:
 
 	take care, the first 3 diffs are against /dev/null, the rest
 	is a cvs diff.
 
 --- /dev/null	Thu Sep  6 08:24:23 2001
 +++ pkg-message	Wed Sep  5 15:22:36 2001
 @@ -0,0 +1,24 @@
 +****  To setup dhclient, you may need to edit /etc/rc.conf to bypass the
 +      base system dhclient, such as :
 +            dhcp_program="%%PREFIX%%/sbin/dhclient"
 +            dhcp_flags="-q"
 +      See dhclient(8) using the following command for details about the
 +      possible options:
 +            MANPATH=%%MAN1PREFIX%%/man man 8 dhclient
 +      
 +****  To setup dhcpd, you may need to copy %%PREFIX%%/etc/dhcpd.conf.sample
 +      to %%PREFIX%%/etc/dhcpd.conf for editing.  Also, you have to rename
 +      %%PREFIX%%/etc/rc.d/isc-dhcpd.sh.sample to %%PREFIX%%/etc/rc.d/isc-
 +      dhcpd.sh.
 +      
 +      %%PREFIX%%/etc/rc.isc-dhcpd.conf may be edited to tune some startup
 +      variables such as `dhcpd_options' or `dhcpd_ifaces', both defaulted
 +      to nothing. See dhcpd(8) for details about the possible options.
 +      
 +****  To setup dhcrelay, you have to rename %%PREFIX%%/etc/rc.d/isc-
 +      dhcrelay.sh.sample to %%PREFIX%%/etc/rc.d/isc-dhcrelay.sh.
 +      
 +      %%PREFIX%%/etc/rc.isc-dhcrelay.conf may need to be edited to setup
 +      the `dhcrelay_servers' as required. you may also tune `dhcrelay_options'
 +      and `dhcrelay_ifaces', both defaulted to nothing, if needed. See
 +      dhcrelay(8) for details about the possible options.
 
 --- /dev/null	Thu Sep  6 08:24:23 2001
 +++ files/isc-dhcrelay.sh.sample	Tue Aug 21 02:10:34 2001
 @@ -0,0 +1,78 @@
 +#! /bin/sh
 +#
 +# $FreeBSD$
 +#
 +# Start or stop isc-dhcrelay.
 +#
 +
 +rc_file=${0##*/}
 +rc_arg=$1
 +
 +# override these variables in ${PREFIX}/etc/rc.isc-dhcrelay.conf
 +dhcrelay_options=			# command option(s)
 +dhcrelay_ifaces=			# ethernet interface(s)
 +dhcrelay_servers=			# dhcpd server(s)
 +
 +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${rc_file}\$"); then
 +	echo "${rc_file}: Cannot determine PREFIX." >&2
 +	echo "Please use the complete pathname." >&2
 +	exit 64
 +fi
 +
 +rcconf_dir=${PREFIX}/etc
 +rcconf_file=rc.${rc_file%.sh}.conf
 +rcconf_path=${rcconf_dir}/${rcconf_file}
 +
 +if [ -f ${rcconf_path} ]; then
 +	. ${rcconf_path}
 +fi
 +
 +program_dir=${PREFIX}/sbin
 +program_file=dhcrelay
 +program_path=${program_dir}/${program_file}
 +
 +pid_dir=/var/run
 +pid_file=${program_file}.pid
 +pid_path=${pid_dir}/${pid_file}
 +
 +syslog_facility=daemon.err
 +
 +case "$rc_arg" in
 +start)
 +	if [ ! -x ${program_path} ]; then
 +		logger -sp ${syslog_facility} -t ${program_file} \
 +			"unable to start: ${program_path} is missing."
 +		exit 72
 +	fi
 +	if [ -z "${dhcrelay_servers}" ]; then
 +		logger -sp ${syslog_facility} -t ${program_file} \
 +			"unable to start: no dhcpd server(s) configured."
 +		exit 64
 +	fi
 +	ifaces=
 +	for iface in ${dhcrelay_ifaces}; do
 +		ifaces="$ifaces -i $iface"
 +	done
 +	${program_path} ${dhcrelay_options} ${ifaces} ${dhcrelay_servers} &&
 +	echo -n " ${program_file}"
 +	;;
 +stop)
 +	if [ -r ${pid_path} ]; then
 +		kill $(cat ${pid_path}) 2> /dev/null
 +	else
 +		killall ${program_file} 2> /dev/null
 +	fi
 +	;;
 +restart)
 +	$0 stop
 +	$0 start
 +	;;
 +status)
 +	ps -auxww | egrep ${program_file} | egrep -v "($0|egrep)"
 +	;;
 +*)
 +	echo "usage: ${rc_file} {start|stop|restart|status}" >&2
 +	;;
 +esac
 +
 +exit 0
 
 --- /dev/null	Thu Sep  6 08:24:23 2001
 +++ files/rc.isc-dhcrelay.conf.sample	Mon Aug 20 22:51:22 2001
 @@ -0,0 +1,8 @@
 +# $FreeBSD$
 +#
 +# isc-dhcrelay startup configuration file.
 +#
 +
 +dhcrelay_options=			# command option(s)
 +dhcrelay_ifaces=			# ethernet interface(s)
 +dhcrelay_servers=			# dhcpd server(s)
 
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/net/isc-dhcp3/Makefile,v
 retrieving revision 1.70
 diff -u -r1.70 Makefile
 --- Makefile	2001/08/20 11:46:34	1.70
 +++ Makefile	2001/09/06 06:53:37
 @@ -7,7 +7,7 @@
  #
  
  PORTNAME=	dhcp
 -PORTVERSION=	3.0.r11
 +PORTVERSION=	3.0.r12
  CATEGORIES=	net
  MASTER_SITES=	ftp://ftp.isc.org/isc/%SUBDIR%/ \
  		${US_MASTER_SITES} ${JAPAN_MASTER_SITES} \
 @@ -26,18 +26,13 @@
  
  MAINTAINER=	clefevre@citeweb.net
  
 -#
 +.include <bsd.port.pre.mk>
 +
  # Global variables
  #
  
  HAS_CONFIGURE=	yes
  
 -PLIST_SUB=	DATA_DIR="${DATA_DIR}" RCD_SUBDIR="${RCD_SUBDIR}" \
 -		CONF_SUBDIR="${CONF_SUBDIR}" SAMP_SUBDIR="${SAMP_SUBDIR}" \
 -		BIN_SUBDIR="${BIN_SUBDIR}" SBIN_SUBDIR="${SBIN_SUBDIR}" \
 -		INC_SUBDIR="${INC_SUBDIR}" LIB_SUBDIR="${LIB_SUBDIR}" \
 -		DOC_SUBDIR="${DOC_SUBDIR}" SAMP_SUFFIX="${SAMP_SUFFIX}"
 -
  MAN1=		omshell.1
  MAN3=		dhcpctl.3 omapi.3 omshell.3
  MAN5=		dhclient.conf.5 dhclient.leases.5 dhcp-contrib.5 \
 @@ -45,7 +40,9 @@
  		dhcpd.leases.5
  MAN8=		dhclient.8 dhclient-script.8 dhcpd.8 dhcrelay.8
  
 -#
 +MSG_FILE=	${PKGDIR}/pkg-message
 +PKGMESSAGE=	${WRKDIR}/pkg-message
 +
  # Local variables
  #
  
 @@ -79,10 +76,11 @@
  TURKEY_MASTER_SITES=	ftp://ftp.ulak.net.tr/pub/networking/isc/%SUBDIR%/ \
  			ftp://ftp.metu.edu.tr/pub/mirrors/ftp.isc.org/%SUBDIR%/
  
 -# for instance, possible version formats are, in order:
 +# for instance, possible versions are:
  #	1.2.r3.4 (or 1.2.b3.4), 1.2.r3 (or 1.2.b3), 1.2.3, 1.2
  # which have to become:
  #	1.2rc3pl4 (or 1.2beta3pl4), 1.2rc3 (or 1.2beta3), 1.2pl3, 1.2
 +# so, the magic things are:
  VERSION=
  PATCHLEVEL=
  .if ${PORTVERSION:R:E:M[br]*} != ""
 @@ -100,46 +98,41 @@
  .endif
  
  PATCH_SUBDIRS=	common minires dst omapip server client relay dhcpctl
 -
 -SAMP_SUFFIX=	.sample
  
 -BIN_FILES=	dhclient dhcpd dhcrelay
 +BIN_FILES=	dhclient dhcpd dhcrelay omshell
  CONF_FILES=	dhclient.conf
 -SAMP_FILES=	client/dhclient.conf server/dhcpd.conf
 -RCD_FILES=	isc-dhcpd.sh${SAMP_SUFFIX}
 +RC_FILES=	isc-dhcpd isc-dhcrelay
  DOC_FILES=	CHANGES COPYRIGHT README RELNOTES
 +SAMP_FILES=	client/dhclient.conf server/dhcpd.conf
  DATA_FILES=	dhclient.leases dhcpd.leases
 +
 +SAMP_SUFX=	.sample
  
 -BIN_SUBDIR=	bin
 -SBIN_SUBDIR=	sbin
 -CONF_SUBDIR=	etc
 -SAMP_SUBDIR=	${CONF_SUBDIR}
 -RCD_SUBDIR=	etc/rc.d
 -INC_SUBDIR=	include
 -LIB_SUBDIR=	lib
 -DOC_SUBDIR=	share/doc/${PKGBASE}
 -DATA_DIR=	/var/db
 +CONF_DIR=	${PREFIX}/etc
 +RC_DIR=		${PREFIX}/etc/rc.d
 +DOCSDIR=	${PREFIX}/share/doc/${PKGBASE}
 +DATADIR=	/var/db
  
  STRIP_CMD?=	strip
  
 -#
  # Post-patch
  #
  
 -post-patch: patch-scripts patch-makefile-conf patch-makefiles-dist \
 -	    patch-man-pages
 +post-patch: patch-scripts patch-makefile-conf \
 +	    patch-makefiles-dist patch-man-pages \
 +	    patch-message
  
  patch-scripts:
 -	@${PERL} -pi.fbsd -e 's.!!PREFIX!!.${PREFIX}.g' \
 +	@${PERL} -pi.fbsd -e 's|%%PREFIX%%|${PREFIX}|g' \
  		${WRKSRC}/client/scripts/freebsd
  
  patch-makefile-conf:
 -	@${PERL} -pi.fbsd -e 's|^DEBUG[ 	]*=|# DEBUG ?=|g' \
 +	@${PERL} -pi.fbsd -e 's|^DEBUG[ \t]*=|# DEBUG ?=|g' \
  		${WRKSRC}/Makefile.conf
  
  patch-makefiles-dist:
  .for subdir in ${PATCH_SUBDIRS}
 -	@${PERL} -pi.fbsd -e 's|^CFLAGS[ 	]*=|CFLAGS +=|g' \
 +	@${PERL} -pi.fbsd -e 's|^CFLAGS[ \t]*=|CFLAGS +=|g' \
  		${WRKSRC}/${subdir}/Makefile.dist
  .endfor
  
 @@ -147,52 +140,70 @@
  patch-man-pages:
  	@${PERL} -ni.fbsd -e '/^\.Fd$$/ or print;' ${WRKSRC}/dhcpctl/dhcpctl.3
  
 -#
 +patch-message:
 +	@${SED} 's|%%PREFIX%%|${PREFIX}|g;s|%%MAN1PREFIX%%|${MAN1PREFIX}|g' \
 +		${MSG_FILE} > ${PKGMESSAGE}
 +
  # Post-install
  #
  
  post-install: strip-binary-files install-startup-files \
  	      install-doc-files install-sample-files \
 -	      create-data-files create-conf-files
 +	      create-conf-files create-data-files \
 +	      display-message
  
  strip-binary-files:
  .for file in ${BIN_FILES}
 -.if exists(${PREFIX}/${BIN_SUBDIR}/${file})
 -	@${STRIP_CMD} ${PREFIX}/${BIN_SUBDIR}/${file}
 +.if exists(${PREFIX}/bin/${file})
 +	@${STRIP_CMD} ${PREFIX}/bin/${file}
 +.endif
 +.if exists(${PREFIX}/sbin/${file})
 +	@${STRIP_CMD} ${PREFIX}/sbin/${file}
  .endif
  .endfor
  
  install-startup-files:
 -.for file in ${RCD_FILES}
 -	@${INSTALL_SCRIPT} ${FILESDIR}/${file} ${PREFIX}/${RCD_SUBDIR}
 +.for file in ${RC_FILES}
 +.if exists(${FILESDIR}/rc.${file}.conf${SAMP_SUFX})
 +	@${INSTALL_DATA} ${FILESDIR}/rc.${file}.conf${SAMP_SUFX} ${CONF_DIR}
 +.if !exists(${CONF_DIR}/rc.${file}.conf)
 +	@${INSTALL_DATA} ${FILESDIR}/rc.${file}.conf${SAMP_SUFX} \
 +		${CONF_DIR}/rc.${file}.conf
 +.endif
 +.endif
 +.if exists(${FILESDIR}/${file}.sh${SAMP_SUFX})
 +	@${INSTALL_SCRIPT} ${FILESDIR}/${file}.sh${SAMP_SUFX} ${RC_DIR}
 +.endif
  .endfor
  
  install-doc-files:
  .if !defined(NOPORTDOCS)
 -	@${MKDIR} ${PREFIX}/${DOC_SUBDIR}
 +	@${MKDIR} ${DOCSDIR}
  .for file in ${DOC_FILES}
 -	@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/${DOC_SUBDIR}
 +	@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
  .endfor
  .endif
  
  install-sample-files:
  .for file in ${SAMP_FILES}
 -	@${INSTALL_DATA} ${WRKSRC}/${file} \
 -		${PREFIX}/${SAMP_SUBDIR}/${file:T}${SAMP_SUFFIX}
 +	@${INSTALL_DATA} ${WRKSRC}/${file} ${CONF_DIR}/${file:T}${SAMP_SUFX}
  .endfor
  
 -create-data-files:
 -.for file in ${DATA_FILES}
 -.if !exists(${DATA_DIR}/${file})
 -	@${TOUCH} ${DATA_DIR}/${file}
 +create-conf-files:
 +.for file in ${CONF_FILES}
 +.if !exists(${CONF_DIR}/${file})
 +	@${TOUCH} ${CONF_DIR}/${file}
  .endif
  .endfor
  
 -create-conf-files:
 -.for file in ${CONF_FILES}
 -.if !exists(${PREFIX}/${CONF_SUBDIR}/${file})
 -	@${TOUCH} ${PREFIX}/${CONF_SUBDIR}/${file}
 +create-data-files:
 +.for file in ${DATA_FILES}
 +.if !exists(${DATADIR}/${file})
 +	@${TOUCH} ${DATADIR}/${file}
  .endif
  .endfor
 +
 +display-message:
 +	@${CAT} ${PKGMESSAGE}
  
 -.include <bsd.port.mk>
 +.include <bsd.port.post.mk>
 Index: distinfo
 ===================================================================
 RCS file: /home/ncvs/ports/net/isc-dhcp3/distinfo,v
 retrieving revision 1.35
 diff -u -r1.35 distinfo
 --- distinfo	2001/08/19 18:19:15	1.35
 +++ distinfo	2001/09/05 04:51:48
 @@ -1 +1 @@
 -MD5 (dhcp-3.0rc11.tar.gz) = 6b244e2bb056d423a49aca7b6bbeee91
 +MD5 (dhcp-3.0rc12.tar.gz) = 7aa34ef3cd4a24f0c6857283d5261003
 Index: pkg-plist
 ===================================================================
 RCS file: /home/ncvs/ports/net/isc-dhcp3/pkg-plist,v
 retrieving revision 1.18
 diff -u -r1.18 pkg-plist
 --- pkg-plist	2001/06/07 11:17:07	1.18
 +++ pkg-plist	2001/08/21 16:35:14
 @@ -1,36 +1,44 @@
  @comment $FreeBSD: ports/net/isc-dhcp3/pkg-plist,v 1.18 2001/06/07 11:17:07 jeh Exp $
 -%%SAMP_SUBDIR%%/dhclient.conf%%SAMP_SUFFIX%%
 -%%SAMP_SUBDIR%%/dhcpd.conf%%SAMP_SUFFIX%%
 -%%RCD_SUBDIR%%/isc-dhcpd.sh%%SAMP_SUFFIX%%
 -%%INC_SUBDIR%%/dhcpctl.h
 -%%INC_SUBDIR%%/isc-dhcp/boolean.h
 -%%INC_SUBDIR%%/isc-dhcp/dst.h
 -%%INC_SUBDIR%%/isc-dhcp/int.h
 -%%INC_SUBDIR%%/isc-dhcp/lang.h
 -%%INC_SUBDIR%%/isc-dhcp/list.h
 -%%INC_SUBDIR%%/isc-dhcp/result.h
 -%%INC_SUBDIR%%/isc-dhcp/types.h
 -%%INC_SUBDIR%%/omapip/alloc.h
 -%%INC_SUBDIR%%/omapip/buffer.h
 -%%INC_SUBDIR%%/omapip/omapip.h
 -%%LIB_SUBDIR%%/libdhcpctl.a
 -%%LIB_SUBDIR%%/libomapi.a
 -%%BIN_SUBDIR%%/omshell
 -%%SBIN_SUBDIR%%/dhclient
 -%%SBIN_SUBDIR%%/dhclient-script
 -%%SBIN_SUBDIR%%/dhcpd
 -%%SBIN_SUBDIR%%/dhcrelay
 -%%PORTDOCS%%%%DOC_SUBDIR%%/CHANGES
 -%%PORTDOCS%%%%DOC_SUBDIR%%/COPYRIGHT
 -%%PORTDOCS%%%%DOC_SUBDIR%%/README
 -%%PORTDOCS%%%%DOC_SUBDIR%%/RELNOTES
 -@dirrm %%INC_SUBDIR%%/isc-dhcp
 -@dirrm %%INC_SUBDIR%%/omapip
 -%%PORTDOCS%%@dirrm %%DOC_SUBDIR%%
 -@unexec rm -f %%RCD_SUBDIR%%/isc-dhcpd.sh
 -@exec [ -f %%DATA_DIR%%/dhclient.leases ] || touch %%DATA_DIR%%/dhclient.leases
 -@unexec [ -s %%DATA_DIR%%/dhclient.leases ] || rm -f %%DATA_DIR%%/dhclient.leases
 -@exec [ -f %%DATA_DIR%%/dhcpd.leases ] || touch %%DATA_DIR%%/dhcpd.leases
 -@unexec [ -s %%DATA_DIR%%/dhcpd.leases ] || rm -f %%DATA_DIR%%/dhcpd.leases
 -@exec [ -f %D/%%CONF_SUBDIR%%/dhclient.conf ] || touch %D/%%CONF_SUBDIR%%/dhclient.conf
 -@unexec [ -L %D/%%CONF_SUBDIR%%/dhclient.conf -o -s %D/%%CONF_SUBDIR%%/dhclient.conf ] || rm -f %D/%%CONF_SUBDIR%%/dhclient.conf
 +bin/omshell
 +etc/dhclient.conf.sample
 +@exec [ -f %D/etc/dhclient.conf ] || touch %D/etc/dhclient.conf
 +@unexec [ -L %D/etc/dhclient.conf -o -s %D/etc/dhclient.conf ] || rm -f %D/etc/dhclient.conf
 +etc/dhcpd.conf.sample
 +@unexec if cmp -s %D/etc/rc.isc-dhcpd.conf %D/etc/rc.isc-dhcpd.conf.sample; then rm -f %D/etc/rc.isc-dhcpd.conf; fi
 +etc/rc.isc-dhcpd.conf.sample
 +@exec [ -f %D/etc/rc.isc-dhcpd.conf ] || cp %D/etc/rc.isc-dhcpd.conf.sample %D/etc/rc.isc-dhcpd.conf
 +@unexec if cmp -s %D/etc/rc.isc-dhcrelay.conf %D/etc/rc.isc-dhcrelay.conf.sample; then rm -f %D/etc/rc.isc-dhcrelay.conf; fi
 +etc/rc.isc-dhcrelay.conf.sample
 +@exec [ -f %D/etc/rc.isc-dhcrelay.conf ] || cp %D/etc/rc.isc-dhcrelay.conf.sample %D/etc/rc.isc-dhcrelay.conf
 +etc/rc.d/isc-dhcpd.sh.sample
 +@unexec rm -f etc/rc.d/isc-dhcpd.sh
 +etc/rc.d/isc-dhcrelay.sh.sample
 +@unexec rm -f etc/rc.d/isc-dhcrelay.sh
 +include/dhcpctl.h
 +include/isc-dhcp/boolean.h
 +include/isc-dhcp/dst.h
 +include/isc-dhcp/int.h
 +include/isc-dhcp/lang.h
 +include/isc-dhcp/list.h
 +include/isc-dhcp/result.h
 +include/isc-dhcp/types.h
 +include/omapip/alloc.h
 +include/omapip/buffer.h
 +include/omapip/omapip.h
 +lib/libdhcpctl.a
 +lib/libomapi.a
 +sbin/dhclient
 +sbin/dhclient-script
 +sbin/dhcpd
 +sbin/dhcrelay
 +%%PORTDOCS%%share/doc/isc-dhcp3/CHANGES
 +%%PORTDOCS%%share/doc/isc-dhcp3/COPYRIGHT
 +%%PORTDOCS%%share/doc/isc-dhcp3/README
 +%%PORTDOCS%%share/doc/isc-dhcp3/RELNOTES
 +@dirrm include/isc-dhcp
 +@dirrm include/omapip
 +%%PORTDOCS%%@dirrm share/doc/isc-dhcp3
 +@exec [ -f /var/run/dhclient.leases ] || touch /var/run/dhclient.leases
 +@unexec [ -s /var/run/dhclient.leases ] || rm -f /var/run/dhclient.leases
 +@exec [ -f /var/run/dhcpd.leases ] || touch /var/run/dhcpd.leases
 +@unexec [ -s /var/run/dhcpd.leases ] || rm -f /var/run/dhcpd.leases
 Index: files/isc-dhcpd.sh.sample
 ===================================================================
 RCS file: /home/ncvs/ports/net/isc-dhcp3/files/isc-dhcpd.sh.sample,v
 retrieving revision 1.3
 diff -u -r1.3 isc-dhcpd.sh.sample
 --- files/isc-dhcpd.sh.sample	2001/03/08 20:06:36	1.3
 +++ files/isc-dhcpd.sh.sample	2001/08/22 03:10:02
 @@ -1,32 +1,77 @@
  #! /bin/sh
 -
 +#
  # $FreeBSD: ports/net/isc-dhcp3/files/isc-dhcpd.sh.sample,v 1.3 2001/03/08 20:06:36 sf Exp $
 +#
 +# Start or stop isc-dhcpd.
 +#
 +
 +rc_file=${0##*/}
 +rc_arg=$1
 +
 +# override these variables in ${PREFIX}/etc/rc.isc-dhcpd.conf
 +dhcpd_options=			# command option(s)
 +dhcpd_ifaces=			# ethernet interface(s)
 +
 +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${rc_file}\$"); then
 +	echo "${rc_file}: Cannot determine PREFIX." >&2
 +	echo "Please use the complete pathname." >&2
 +	exit 64
 +fi
  
 -OPTIONS=""
 -IFACES=""
 +rcconf_dir=${PREFIX}/etc
 +rcconf_file=rc.${rc_file%.sh}.conf
 +rcconf_path=${rcconf_dir}/${rcconf_file}
  
 -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
 -	echo "$0: Cannot determine the PREFIX" >&2
 -	exit 1
 +if [ -f ${rcconf_path} ]; then
 +	. ${rcconf_path}
  fi
 +
 +program_dir=${PREFIX}/sbin
 +program_file=dhcpd
 +program_path=${program_dir}/${program_file}
 +
 +config_dir=${PREFIX}/etc
 +config_file=${program_file}.conf
 +config_path=${config_dir}/${config_file}
 +
 +pid_dir=/var/run
 +pid_file=${program_file}.pid
 +pid_path=${pid_dir}/${pid_file}
 +
 +syslog_facility=daemon.err
  
 -case "$1" in
 +case "$rc_arg" in
  start)
 -	${PREFIX}/sbin/dhcpd $OPTIONS $IFACES > /dev/null 2>&1
 -	echo -n ' dhcpd'
 +	if [ ! -x ${program_path} ]; then
 +		logger -sp ${syslog_facility} -t ${program_file} \
 +			"unable to start: ${program_path} is missing."
 +		exit 72
 +	fi
 +	if [ ! -f ${config_file} ]; then
 +		logger -sp ${syslog_facility} -t ${program_file} \
 +			"unable to start: ${config_path} is missing."
 +		exit 72
 +	fi
 +	${program_path} ${dhcpd_options} ${dhcpd_ifaces} &&
 +	echo -n " ${program_file}"
  	;;
  stop)
 -	killall dhcpd
 +	if [ -r ${pid_path} ]; then
 +		kill $(cat ${pid_path}) 2> /dev/null
 +	else
 +		killall ${program_file} 2> /dev/null
 +	fi
  	;;
  restart)
  	$0 stop
  	$0 start
  	;;
  status)
 -	ps -auxww | egrep '(conserver|console)' | egrep -v "($0|egrep)"
 +	ps -auxww | egrep ${program_file} | egrep -v "($0|egrep)"
  	;;
  *)
 -	echo "usage: ${0##*/} {start|stop|restart|status}" >&2
 +	echo "usage: ${rc_file} {start|stop|restart|status}" >&2
 +	exit 64
  	;;
  esac
  
 Index: files/patch-freebsd
 ===================================================================
 RCS file: /home/ncvs/ports/net/isc-dhcp3/files/patch-freebsd,v
 retrieving revision 1.6
 diff -u -r1.6 patch-freebsd
 --- files/patch-freebsd	2001/04/22 11:59:08	1.6
 +++ files/patch-freebsd	2001/08/20 19:17:49
 @@ -6,8 +6,8 @@
     exit_status=$1
  -  if [ -f /etc/dhclient-exit-hooks ]; then
  -    . /etc/dhclient-exit-hooks
 -+  if [ -f !!PREFIX!!/etc/dhclient-exit-hooks ]; then
 -+    . !!PREFIX!!/etc/dhclient-exit-hooks
 ++  if [ -f %%PREFIX%%/etc/dhclient-exit-hooks ]; then
 ++    . %%PREFIX%%/etc/dhclient-exit-hooks
     fi
   # probably should do something with exit status of the local script
     exit $exit_status
 @@ -15,10 +15,10 @@
   
   # Invoke the local dhcp client enter hooks, if they exist.
  -if [ -f /etc/dhclient-enter-hooks ]; then
 -+if [ -f !!PREFIX!!/etc/dhclient-enter-hooks ]; then
 ++if [ -f %%PREFIX%%/etc/dhclient-enter-hooks ]; then
     exit_status=0
  -  . /etc/dhclient-enter-hooks
 -+  . !!PREFIX!!/etc/dhclient-enter-hooks
 ++  . %%PREFIX%%/etc/dhclient-enter-hooks
     # allow the local script to abort processing of this state
     # local script must set exit_status variable to nonzero.
     if [ $exit_status -ne 0 ]; then

From: Peter Pentchev <roam@ringlet.net>
To: Cyrille Lefevre <clefevre@citeweb.net>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: Startup scripts configuration [Was: Re: ports/30274: isc-dhcp3 port out of date]
Date: Sat, 8 Sep 2001 18:25:01 +0300

 On Sat, Sep 08, 2001 at 05:20:47PM +0200, Cyrille Lefevre wrote:
 > Peter Pentchev wrote:
 > > On Thu, Sep 06, 2001 at 12:00:14AM -0700, Cyrille Lefevre wrote:
 > > > The following reply was made to PR ports/30274; it has been noted by GNATS.
 > [snip]
 > > >  	files/isc-dhcpd.sh.sample
 > > >  		enhanced a lot to read startup options from
 > > >  		etc/rc.isc-dhcpd.conf.
 > > >  		program and config files checking added.
 > > >  		messages logged through syslog.
 > > 
 > > And once again, this makes me wonder: would it not be better to have
 > > a common way of having ports' startup scripts - and local startup scripts,
 > > in general - read configuration from a single source?
 > 
 > how do you handle adding/removing/upgrading per-port specific
 > sections in a single file ? for example, I make the use of
 > ${PREFIX}/etc/rc.<something>.conf to keep parameters over upgrades
 > instead of putting them (except defaul values) in ${PREFIX}/etc/rc.d/...
 > putting them in a single file complicates things a lot. well,
 > maybe ${PREFIX}/etc isn't the best place for them (how about
 > ${PREFIX}/etc/rc.conf.d a la HP-UX ?), but single config files
 > for ports aren't applicable so easily.
 
 How about not force this upon the user, and let the user make her
 own choice about whether to keep everything in a single file,
 or use here-documents to source all the per-program config files? :)
 A single file lets you use here-documents to divide up your config;
 multiple config files do not let you keep all the configuration
 in a single place (like I really, really like to do).
 
 G'luck,
 Peter
 
 -- 
 If I were you, who would be reading this sentence?
State-Changed-From-To: open->closed 
State-Changed-By: asmodai 
State-Changed-When: Sat Oct 6 06:38:23 PDT 2001 
State-Changed-Why:  
Confirmed by maintainer to be similar to 31058. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30274 
>Unformatted:
