Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Sep 2024 03:38:58 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 281701] net/isc-dhcp44-server: restart fails with certain values of dhcpd_flags
Message-ID:  <bug-281701-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281701

            Bug ID: 281701
           Summary: net/isc-dhcp44-server: restart fails with certain
                    values of dhcpd_flags
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: zi@FreeBSD.org
          Reporter: cross+freebsd@distal.com
             Flags: maintainer-feedback?(zi@FreeBSD.org)
          Assignee: zi@FreeBSD.org

With the following value in my /etc/rc.conf, "service isc-dhcpd restart" wi=
ll
fail due to invalid command line arguments.

dhcpd_flags=3D"-4 -q"

For some reason, "stop" and "start" both work.  But, "restart" invokes
dhcpd_checkconfig() which performs a sed that breaks the above value of
dhcpd_flags.

Portion of sh -x of the restart operation shows the problem:

+ rc_flags=3D'-4 -q -cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.l=
eases
-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=E2=80=99
+ rc_flags_mod=3D'-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=E2=80=99
+ 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=E2=80=99
+ sed -Ee 's/(^-q | -q | -q$)//=E2=80=98
+ rc_flags_mod=3D'-4-cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.l=
eases
-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=E2=80=99
+ /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


I think replacing "-q" and surrounding spaces with "//" (empty string) is an
error.  If also removing the spaces around the argument you ae removing, you
need to replace the sequence with space to avoid the above problem.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-281701-7788>