Index | Thread | Search

From:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Subject:
Re: add rcctl configtest ospfd/ospf6d
To:
tech@openbsd.org
Date:
Mon, 26 Feb 2024 14:47:04 +0100

Download raw body.

Thread
On Mon, Feb 26, 2024 at 01:39:13PM +0000, Klemens Nanni wrote:
> 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?

I don't know. AFAIK there was no fix for this.

> One that can't be fixed in rc* code?

No idea, I guess it should.
 
> 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.

I wonder if most of those have similar issues and just work because people
did not use complex _flags settings.
 
> > > 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