tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: System/version specific rc.d scripts?

Martin Husemann <> writes:

> --- nsd	2019-08-04 10:35:49.988425697 +0200
> +++ /usr/pkg/share/examples/rc.d/nsd	2018-12-28 11:03:27.000000000 +0100
> @@ -18,7 +18,6 @@
>  nsd_precmd()
>  {
> -	ifconfig -w 30
>  	if [ ! -d /var/run/nsd ]; then
>  		/bin/mkdir -p /var/run/nsd
>  		/bin/chmod 0750 /var/run/nsd

I don't remember us running into this before, but it's certainly a
reasonable concept.   A few ideas, not really evaluated carefully:

1) This is perhaps not really a nsd-specific issue, but a more general
issue that a number of daemons need to depend on not only the network
being up, but the network being up and no longer tentative.

  A) perhaps the network-up script should wait

  B) perhaps there should be a network-nontentative rc.d script that
  waits, that nsd can depend on (I think rc.d depends that are not
  present are ignored)

2) It seems easy enough to have an if statement with uname -s/-r in the
rc.d script to condition the ifconfig -w invocation.

3) one could put in @IFCONFIG_W@ in the file, and have an if in the
package conditioned on OS/version to SUBST_SED in either the command or
nothing.  This means packages built on 7 won't do this on 8, but that is
ok - a daemon with native support wouldn't have it in such a binary

4) One could patch nsd to deal with this itself.

Overall, 1 is an interesting thing to discuss but I don't expect it to
solve your problem any time soon.  I would probably tend to 3.

I am definitely curious what others think.

Home | Main Index | Thread Index | Old Index