ports/115967: enable chrooted dhcpd on the FreeBSD 7.x
Eygene Ryabinkin
rea-fbsd at codelabs.ru
Fri Aug 31 13:30:02 UTC 2007
>Number: 115967
>Category: ports
>Synopsis: enable chrooted dhcpd on the FreeBSD 7.x
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Aug 31 13:30:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Eygene Ryabinkin
>Release: FreeBSD 7.0-CURRENT i386
>Organization:
Code Labs
>Environment:
System: FreeBSD XXX 7.0-CURRENT FreeBSD 7.0-CURRENT #9: Wed Aug 8 10:56:57 MSD 2007 root at XXX:/usr/src/sys/i386/compile/XXX i386
>Description:
rc.d script for the ISC dhcpd tries to locate the mount_devfs
executable and disables the creation of the device filesystem
at the chroot directory if the binary was not found.
The reason of the error is that mount_devfs was removed from
FreeBSD 7: see src/sbin/Makefile, rev. 1.164.
>How-To-Repeat:
Install FreeBSD 7, isc-dhcpd3 and try to run the daemon. It will
warn you that 'dhcpd_devfs_enable disabled -- not available' and
dhcpd will not start because it won't see any bpf devices.
>Fix:
Check for the FreeBSD version and do not look for mount_devfs on
7-CURRENT and later. The following patch implements a quick check
for the first symbol of the 'uname -r'. It might be possible to
implement more fine-grained check to catch early 7-CURRENT versions
that had mount_devfs inside, but I doubt that it worth the effort.
--- files/isc-dhcpd.in.orig 2007-08-31 16:57:04.000000000 +0400
+++ files/isc-dhcpd.in 2007-08-31 16:58:15.000000000 +0400
@@ -354,12 +354,15 @@
err 1 "dhcpd_devfs_enable and dhcpd_makedev_enable" \
"are mutually exclusive. enable only one!"
fi
+ # mount_devfs disappeared in FreeBSD 7.
+ if test `uname -r | cut -c 1` -le 6; then
if checkyesno dhcpd_devfs_enable &&
! ( type mount_devfs ) > /dev/null 2>&1; then
warn "dhcpd_devfs_enable disabled" \
"-- not available"
dhcpd_devfs_enable=NO
fi
+ fi
if checkyesno dhcpd_makedev_enable &&
! [ -x ${__dhcpd_devdir}/MAKEDEV ]; then
warn "dhcpd_makedev_enable disabled" \
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list