isc-dhcpd rc.d failure
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Sep 2024 02:59:39 UTC
Hello. FreeBSD 14.1, isc-dhcp44-server-4.4.3P1_1. I find when I run “service isc-dhcpd restart”, I get failures/errors boiling down to: Unknown command -4-cf Usage: dhcpd [-p <UDP port #>] [-f] [-d] [-q] [-t|-T] [-4|-6] [-cf config-file] [-lf lease-file] Tracing the script, I see this is caused by the sed in dhcpd_checkconfig() + rc_flags='-4 -q -cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.leases -pf /var/run/dhcpd/dhcpd.pid -user dhcpd -group dhcpd int1 int2 -cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.leases -pf /var/run/dhcpd/dhcpd.pid -user dhcpd -group dhcpd int1 int2’ + rc_flags_mod='-4 -q -cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.leases -pf /var/run/dhcpd/dhcpd.pid -user dhcpd -group dhcpd int1 int2 -cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.leases -pf /var/run/dhcpd/dhcpd.pid -user dhcpd -group dhcpd int1 int2’ + echo '-4 -q -cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.leases -pf /var/run/dhcpd/dhcpd.pid -user dhcpd -group dhcpd int1 int2 -cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.leases -pf /var/run/dhcpd/dhcpd.pid -user dhcpd -group dhcpd int1 int2’ + sed -Ee 's/(^-q | -q | -q$)//‘ + rc_flags_mod='-4-cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.leases -pf /var/run/dhcpd/dhcpd.pid -user dhcpd -group dhcpd int1 int2 -cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.leases -pf /var/run/dhcpd/dhcpd.pid -user dhcpd -group dhcpd int1 int2’ + /usr/local/sbin/dhcpd -t -q -4-cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.leases -pf /var/run/dhcpd/dhcpd.pid -user dhcpd -group dhcpd int1 int2 -cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.leases -pf /var/run/dhcpd/dhcpd.pid -user dhcpd -group dhcpd int1 int2 (Replaced my interface list with “int1 int2”, but direct other than that.) Clearly, the attempt to remove the “-q” is breaking things given what I have in /etc/rc.conf: dhcpd_flags="-4 -q” Thanks. In addition, if anyone wants to figure out why it seems that the options are doubled up, that may be the real problem. *shrug* - Chris