Index | Thread | Search

From:
Klemens Nanni <kn@openbsd.org>
Subject:
Re: add rcctl configtest ospfd/ospf6d
To:
tech@openbsd.org
Date:
Mon, 26 Feb 2024 13:39:13 +0000

Download raw body.

Thread
On Mon, Feb 26, 2024 at 12:09:25PM +0100, Claudio Jeker wrote:
> On Sat, Feb 24, 2024 at 09:29:46AM -0500, aisha wrote:
> > Hi,
> >   I've attached a patch for adding configtest option for ospfd/ospf6d.
> > 
> > OK?
> 
> Please check the rc_configtest function of bgpd. You probably want to do
> the same here as well.

Is that actually still a problem?
One that can't be fixed in rc* code?

Last time I looked, we had an incosistent mix of simple rc_*() as below
and this one

	rc_configtest() {
		# use rc_exec here since daemon_flags may contain arguments with spaces
		rc_exec "${daemon} -n ${daemon_flags}"
	}

but I did not look further into it.

>  
> > Index: ospf6d
> > ===================================================================
> > RCS file: /cvs/src/etc/rc.d/ospf6d,v
> > diff -u -p -r1.3 ospf6d
> > --- ospf6d	11 Jan 2018 19:52:12 -0000	1.3
> > +++ ospf6d	24 Feb 2024 14:25:53 -0000
> > @@ -6,4 +6,8 @@ daemon="/usr/sbin/ospf6d"
> >  
> >  . /etc/rc.d/rc.subr
> >  
> > +rc_configtest() {
> > +	${daemon} ${daemon_flags} -n
> > +}
> > +
> >  rc_cmd $1
> > Index: ospfd
> > ===================================================================
> > RCS file: /cvs/src/etc/rc.d/ospfd,v
> > diff -u -p -r1.3 ospfd
> > --- ospfd	11 Jan 2018 19:52:12 -0000	1.3
> > +++ ospfd	24 Feb 2024 14:25:53 -0000
> > @@ -6,4 +6,8 @@ daemon="/usr/sbin/ospfd"
> >  
> >  . /etc/rc.d/rc.subr
> >  
> > +rc_configtest() {
> > +	${daemon} ${daemon_flags} -n
> > +}
> > +
> >  rc_cmd $1
> > 
> 
> -- 
> :wq Claudio
>