Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Feb 1999 14:58:03 +0100 (CET)
From:      Ugo Paternostro <paterno@dsi.unifi.it>
To:        jseger@FreeBSD.org
Cc:        freebsd-ports@FreeBSD.ORG
Subject:   ports/net/isc-dhcp is a bit broken
Message-ID:  <XFMail.990228145803.paterno@dsi.unifi.it>

next in thread | raw e-mail | index | archive | help
This message is in MIME format
--_=XFMail.1.3.p0.FreeBSD:990228145803:355=_
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello, I'm sending this message to you (and Cc:'ed to the -ports mailing list)
as you're listed as the isc-dhcp port maintainer.

Today I installed the isc-dhcp 1.0pl2 and discovered a few nasty things:

1) the installed dhcpd binary is not stripped;
2) dhcpd looks for it's configuration file (dhcpd.conf) in /etc instead of
   ${PREFIX}/etc
3) no configuration file is installed by default (I would like to have an  
   example one installed in ${PREFIX}/etc/dhcpd.conf.default or something like
   that)
4) no script is provided in ${PREFIX}/etc/rc.d to (re)start the daemon at each
   reboot.

Please see the attached log for a proof of what I'm saying.

You may want to apply my supplied patches to fix those problems. Please
remember to put dhcpd.sh into the "files" subdirectory, too.

Thanks for your time and attention.

Bye, UP

--
+----------------------------+------------------------------------------+
| Ugo Paternostro            | Dipartimento di Sistemi e Informatica    |
| P.zza N. Cannicci, 2       | Via di Santa Marta, 3                    |
| I-50018  SCANDICCI  (FI)   | I-50139  FIRENZE  (FI)                   |
|            Italy           |           Italy                          |
| Voice: +39-055-252115      | Voice: +39-055-4796-425 or -365          |
| Fax  : voice call before   | EMail: paterno@dsi.unifi.it              |
| GSM  : +39-0347-7975881    | WWW  : http://www.dsi.unifi.it/~paterno/ |
+----------------------------+------------------------------------------+
|                All opinions are mine, mine, only mine! :-)            |
+-----------------------------------------------------------------------+

--_=XFMail.1.3.p0.FreeBSD:990228145803:355=_
Content-Disposition: attachment; filename="dhcpd.sh"
Content-Transfer-Encoding: 7bit
Content-Description: dhcpd.sh
Content-Type: text/plain; charset=us-ascii; name=dhcpd.sh; SizeOnDisk=421

#!/bin/sh
dhcpd=%%PREFIX%%/sbin/dhcpd
leases=/var/db/dhcpd.leases

case $1 in
	start)
		if [ -x ${dhcpd} ]; then
			touch ${leases}
			echo -n ' dhcpd'
			${dhcpd}
		fi
		;;
	stop)
		killall `basename ${dhcpd}`
		;;
	restart)
		killall `basename ${dhcpd}`
		echo -n ' Restarting dhcp'
		if [ -x ${dhcpd} ]; then
			touch ${leases}
			echo -n ' dhcpd'
			${dhcpd}
		fi
		;;
	*)
		echo "$0: don't know how to $1"
		;;
esac

--_=XFMail.1.3.p0.FreeBSD:990228145803:355=_
Content-Disposition: attachment; filename="isc-dhcp.diffs"
Content-Transfer-Encoding: 7bit
Content-Description: isc-dhcp.diffs
Content-Type: text/plain; charset=us-ascii; name=isc-dhcp.diffs; SizeOnDisk=2898

cvs diff: Diffing isc-dhcp
Index: isc-dhcp/Makefile
===================================================================
RCS file: /home/ncvs/ports/net/isc-dhcp/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- Makefile	1999/01/13 03:37:27	1.17
+++ Makefile	1999/02/27 16:01:58
@@ -25,5 +25,9 @@
 
 post-install:
 	${TOUCH} /var/db/dhcpd.leases
+	strip ${PREFIX}/sbin/dhcpd
+	${INSTALL_DATA} ${WRKSRC}/dhcpd.conf ${PREFIX}/etc/dhcpd.conf.default
+	${SED} -e "s:%%PREFIX%%:${PREFIX}:" < ${FILESDIR}/dhcpd.sh > ${WRKDIR}/dhcpd.s
h
+	${INSTALL_SCRIPT} ${WRKDIR}/dhcpd.sh ${PREFIX}/etc/rc.d/dhcpd.sh
 
 .include <bsd.port.mk>
cvs diff: Diffing isc-dhcp/files
cvs diff: Diffing isc-dhcp/patches
Index: isc-dhcp/patches/patch-ab
===================================================================
RCS file: /home/ncvs/ports/net/isc-dhcp/patches/patch-ab,v
retrieving revision 1.2
diff -u -r1.2 patch-ab
--- patch-ab	1997/11/14 14:19:04	1.2
+++ patch-ab	1999/02/27 15:19:06
@@ -1,14 +1,14 @@
---- Makefile.dist.orig	Fri May  9 01:44:13 1997
-+++ Makefile.dist	Fri Nov 14 06:06:07 1997
-@@ -121,6 +121,16 @@
+--- Makefile.dist.orig	Thu Jun 25 07:26:17 1998
++++ Makefile.dist	Sat Feb 27 16:15:16 1999
+@@ -122,6 +122,16 @@
  ## FreeBSD
  ##--freebsd--
  #CF = cf/freebsd.h
-+#COPTS  = -Wall -Wstrict-prototypes -Wno-unused -Wno-implicit -Wno-comment \
-+#	  -Wno-uninitialized -Werror
 +#PREFIX ?= /usr/local
 +#BINDIR = ${PREFIX}/sbin
 +#ETC = ${PREFIX}/etc
++#COPTS  = -Wall -Wstrict-prototypes -Wno-unused -Wno-implicit -Wno-comment \
++#	  -Wno-uninitialized -Werror -D_PATH_DHCPD_CONF=\"${ETC}/dhcpd.conf\"
 +#CATMANPAGES = dhcpd.out8 dhcpd.conf.out5
 +#ADMMANDIR = ${PREFIX}/man/man8
 +#ADMMANEXT = .8
@@ -17,8 +17,8 @@
  ##--freebsd--
  
  ## NetBSD
-@@ -199,7 +209,7 @@
- MAN    = dhcpd.8 dhcpd.conf.5
+@@ -228,7 +238,7 @@
+ MAN    = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
  
  DEBUG  = -g
 -CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
@@ -26,7 +26,7 @@
  
  all:	$(PROG) $(CATMANPAGES)
  
-@@ -217,9 +227,9 @@
+@@ -246,9 +256,9 @@
  	  mkdir $(VARDB); \
  	  chmod 755 $(VARDB); \
  	fi
@@ -36,9 +36,9 @@
 -	$(MANINSTALL) $(MANFROM) dhcpd.conf.cat5 $(MANTO) \
 +	$(MANINSTALL) $(MANFROM) dhcpd.conf.out5 $(MANTO) \
  				$(FFMANDIR)/dhcpd.conf$(FFMANEXT)
- 
- clean:
-@@ -242,6 +252,14 @@
+ 	$(MANINSTALL) $(MANFROM) dhcpd.leases.cat5 $(MANTO) \
+ 				$(FFMANDIR)/dhcpd.leases$(FFMANEXT)
+@@ -279,6 +289,14 @@
  
  dhcpd.conf.cat5:	dhcpd.conf.5
  	nroff -man dhcpd.conf.5 >dhcpd.conf.cat5
cvs diff: Diffing isc-dhcp/pkg
Index: isc-dhcp/pkg/PLIST
===================================================================
RCS file: /home/ncvs/ports/net/isc-dhcp/pkg/PLIST,v
retrieving revision 1.6
diff -u -r1.6 PLIST
--- PLIST	1998/08/18 19:48:37	1.6
+++ PLIST	1999/02/27 16:03:00
@@ -1,2 +1,4 @@
+etc/dhcpd.conf.default
+etc/rc.d/dhcpd.sh
 sbin/dhcpd
 @exec touch /var/db/dhcpd.leases

--_=XFMail.1.3.p0.FreeBSD:990228145803:355=_
Content-Disposition: attachment; filename="dhcp.log"
Content-Transfer-Encoding: 7bit
Content-Description: dhcp.log
Content-Type: text/plain; charset=us-ascii; name=dhcp.log; SizeOnDisk=1433

ugo@pegasus:/usr/ports/net/isc-dhcp [0]# make install
===>  Installing for isc-dhcp-1.0.2
/bin/cp /usr/ports/net/isc-dhcp/work/dhcp-1.0pl2/dhcpd.leases.5 /usr/ports/net/i
sc-dhcp/work/dhcp-1.0pl2/dhcpd.leases.cat5
install dhcpd /usr/local/sbin; chmod 755 /usr/local/sbin/dhcpd
if [ ! -d /usr/local/man/man8 ]; then  mkdir /usr/local/man/man8;  chmod 755 /us
r/local/man/man8;  fi
if [ ! -d /usr/local/man/man5 ]; then  mkdir /usr/local/man/man5;  chmod 755 /us
r/local/man/man5;  fi
if [ ! -d /var/db ]; then  mkdir /var/db;  chmod 755 /var/db;  fi
install  dhcpd.out8   /usr/local/man/man8/dhcpd.8
install  dhcpd.conf.out5   /usr/local/man/man5/dhcpd.conf.5
install  dhcpd.leases.cat5   /usr/local/man/man5/dhcpd.leases.5
===>   Generating temporary packing list
/usr/bin/touch /var/db/dhcpd.leases
===>   Compressing manual pages for isc-dhcp-1.0.2
===>   Registering installation for isc-dhcp-1.0.2
ugo@pegasus:/usr/ports/net/isc-dhcp [0]# rehash
ugo@pegasus:/usr/ports/net/isc-dhcp [0]# file /usr/local/sbin/dhcpd
/usr/local/sbin/dhcpd: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBS
D), dynamically linked, not stripped
ugo@pegasus:/usr/ports/net/isc-dhcp [0]# /usr/local/sbin/dhcpd
Internet Software Consortium DHCPD $Name: V1-0-2 $
Copyright 1995, 1996 The Internet Software Consortium.
All rights reserved.
ugo@pegasus:/usr/ports/net/isc-dhcp [0]# Can't open /etc/dhcpd.conf: No such fil
e or directory
dhcpd: exiting.

--_=XFMail.1.3.p0.FreeBSD:990228145803:355=_--
End of MIME message


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.990228145803.paterno>