From owner-freebsd-ports Thu Sep 6 0: 1:15 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id EB2CF37B405 for ; Thu, 6 Sep 2001 00:00:14 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8670EW07539; Thu, 6 Sep 2001 00:00:14 -0700 (PDT) (envelope-from gnats) Date: Thu, 6 Sep 2001 00:00:14 -0700 (PDT) Message-Id: <200109060700.f8670EW07539@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: Cyrille Lefevre Subject: Re: ports/30274: isc-dhcp3 port out of date Reply-To: Cyrille Lefevre Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR ports/30274; it has been noted by GNATS. From: Cyrille Lefevre To: freebsd-gnats-submit@FreeBSD.org Cc: "David W. Chapman Jr." , Nick Johnson , Pete Fritchman 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 + # 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 +.include 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message