Two more easy cases.
rad(8) requires a config file and there is no default /etc/rad.conf, so
configtest will fail unless a valid config (behind -f in rad_flags) exists.
dhcpleased(8) is happy without config at all, so configtest is always happy
unless a bogus config exists.
OK?
Index: dhcpleased
===================================================================
RCS file: /cvs/src/etc/rc.d/dhcpleased,v
retrieving revision 1.1
diff -u -p -r1.1 dhcpleased
--- dhcpleased 26 Feb 2021 17:18:41 -0000 1.1
+++ dhcpleased 13 Oct 2022 20:24:43 -0000
@@ -6,6 +6,11 @@ daemon="/sbin/dhcpleased"
. /etc/rc.d/rc.subr
+rc_configtest() {
+ # use rc_exec here since daemon_flags may contain arguments with spaces
+ rc_exec "${daemon} -n ${daemon_flags}"
+}
+
rc_reload=NO
rc_cmd $1
Index: rad
===================================================================
RCS file: /cvs/src/etc/rc.d/rad,v
retrieving revision 1.1
diff -u -p -r1.1 rad
--- rad 12 Jul 2018 08:20:36 -0000 1.1
+++ rad 13 Oct 2022 20:20:34 -0000
@@ -6,4 +6,9 @@ daemon="/usr/sbin/rad"
. /etc/rc.d/rc.subr
+rc_configtest() {
+ # use rc_exec here since daemon_flags may contain arguments with spaces
+ rc_exec "${daemon} -n ${daemon_flags}"
+}
+
rc_cmd $1