Init script for net-misc/dhcp-3.0.3-r2 doesn't start dhcp with the error: Internet Systems Consortium DHCP Server V3.0.3 Copyright 2004-2005 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Can't open /etc/dhcp/dhcpd.conf: No such file or directory If you did not get this software from ftp.isc.org, please get the latest from ftp.isc.org and install that before requesting help. If you did get this software from ftp.isc.org and have not yet read the README, please read it before requesting help. If you intend to request help from the dhcp-server@isc.org mailing list, please read the section on the README about submitting bug reports and requests for help. Please do not under any circumstances send requests for help directly to the authors of this software - please send them to the appropriate mailing list as described in the README file. exiting. /etc/init.d/dhcp: line 38: --: command not found /etc/init.d/dhcp: line 38: -user: command not found configuration for dhcp /etc/conf.d/dhcp: # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.conf,v 1.8 2005/12/07 13:59:32 uberlord Exp $ # Configure which interface or interfaces to for dhcp to listen on # list all interfaces space separated. If this is not specified then # we listen on all interfaces. IFACE="eth0" # Insert any other dhcp options - see the man page for a full list. #DHCPD_OPTS="" # If you wish to run dhcp in a chroot, run: # ebuild /var/db/pkg/net-misc/<dhcp version>/<dhcp-version>.ebuild config # and un-comment the following line. # You can specify a different chroot directory but MAKE SURE it's empty. CHROOT="/chroot/dhcp" # If you need name resolution under a chroot, you need to ensure that # you have a working /etc/resolv.conf in your chroot and you # uncomment the following: #export LD_PRELOAD="/usr/lib/libresolv.so /usr/lib/libnss_dns.so" emerge --info: Portage 2.0.54 (hardened/x86/2.6, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14-hardened-r5-maint i686) ================================================================= System uname: 2.6.14-hardened-r5-maint i686 AMD Athlon(tm) Processor Gentoo Base System version 1.6.14 dev-lang/python: 2.3.5, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon -m3dnow -mmmx -fomit-frame-pointer -pipe -fforce-addr" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon -m3dnow -mmmx -fomit-frame-pointer -pipe -fforce-addr" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://gentoo.inode.at/source/ ftp://ftp.rhnet.is/pub/gentoo/ http://gentoo.osuosl.org/" MAKEOPTS="-j2" PKGDIR="/usr/portage//packages/x86/" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage/" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow berkdb bzip2 crypt dlloader expat gdbm hardened ipv6 mmx mysql ncurses nls pam pcre perl pic python readline sasl ssl tcpd threads udev unicode userlocales x86 zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Did you run 'emerge --config =net-misc/dhcp-3.0.3-r2' as instructed to by the ebuild?
Yes same thing with emerge --config. I had a chroot already set up before upgrading and nothing went wrong. The problem has appeared after upgrading from r1 to r2 release, which changed the init.d script.
Bug reopened, I think the problem resides in the init.d script.
Created attachment 80259 [details, diff] Attempt to fix issue Could the reporter please test this patch. If it doesn't work, then please attach your full dhcpd.conf
Created attachment 80261 [details, diff] Another patch This one should fix regardless
After the patch, the server start but it has 2 problems. 1) It doesn't create the right "/chroot/dhcp/var/lib/dhcp/dhcp.leases" files, instead it creates "/var/lib/dhcp/dhcp.leases;" (yes with the semicolon, I think this error comes from a bad read of the dhcpd.conf). 2) It can't stop mys server anymore with the error: "No /usr/sbin/dhcpd found running; none killed.". I tried also to create a usr/sbin dir under the chroot dir with a copy of the dhcpd binary, I'm getting always the same error. My general section of dhcpd.conf: ## General options lease-file-name "/var/lib/dhcp/dhcpd.leases"; pid-file-name "/var/run/dhcp/dhcpd.pid"; default-lease-time 600; max-lease-time 7200; authoritative; ddns-update-style none; ignore client-updates; log-facility local7; I have also one subnet declaration but I think this should be enough to help.
Created attachment 80397 [details] New init file OK, here's the my full init file (easier than patching from your end). It should fix both your problems, but you may need to zap the script and kill the dhcpd process manually until the script successfully starts.
Problems solved, bug fixed. Status changed to WORKSFORME. Thank you.
Re-opening until the script hits portage
Fixed in dhcp-3.0.3-r3