Re: git: f0a861efbafe - main - local-unbound-setup: Support IPv6-only systems

From: Alexey Dokuchaev <danfe_at_freebsd.org>
Date: Sat, 27 Jun 2026 17:34:46 UTC
On Sat, Jun 27, 2026 at 05:15:55PM +0000, Shawn Webb wrote:
> On Fri, Jun 26, 2026 at 06:33:18PM +0000, Shawn Webb wrote:
> > On Fri, Jun 26, 2026 at 02:43:37PM +0000, Dag-Erling Sm?rgrav wrote:
> > > commit f0a861efbafeb81428d5e8c23dac9da73fe14007
> > > [...]
> > > +#
> > > +# Check if a kernel feature is available
> > > +#
> > > +has_feature() {
> > > +	local name=$1 v
> > > +	eval "v=\$kern_features_${name}"
> > > +	if [ -z "$v" ] ; then
> > > +		v="$(sysctl -qn "kern.features.${name}")"
> > > +		eval "kern_features_${name}=$((v))"
> > > +	fi
> > > +	return $((!v))
> > > +}
> > 
> > The function above seems like it might be useful outside the context
> > of local-unbound. I'm wondering if this would be a better fit for
> > libexec/rc/rc.subr.
> 
> Ah, I partially misread the commit. Nevermind about the question above.

Could you explain?  This still looks like a useful function to have
outside the context of local-unbound.

./danfe