Subject: Re: /etc/rc.conf and upgrading
To: Simon Burge <simonb@NetBSD.ORG>
From: Robert Elz <kre@munnari.OZ.AU>
List: tech-userlevel
Date: 10/13/1999 12:02:28
    Date:        Wed, 13 Oct 1999 11:06:31 +1000
    From:        Simon Burge <simonb@NetBSD.ORG>
    Message-ID:  <>

  | Robert Elz wrote:
  | > That can be achieved without two files (which then create confusion as
  | > to what overrides what) by making "checkyesno" smarter, so it gets given
  | > the variable name (instead of its value),

And if I had bothered to look, I would have seen it does that

  | > and what NetBSD wants to be the
  | > default value for it, and if the variable isn't set, returns the default.

and if the default default were to be "no" were no default given, this could
be implemented without changing almost anything.

in checkyesno()

	eval value='${'"$1"':-"$dflt"}'

and it is pretty much done I think (may wany to omit the ':' part of the op).

  | I know I should have put more than one smiley on that throwaway line :)

Doesn't matter how many you stick there, someone (like me) will rise...

my rc.subr has the following in it...   you can imagine what it
is used for.

runscripts() {
        if [ -n "$2" -a -d "$2" ]; then 
                cd "$2"
                echo -n "${1}:"
                for script in *.sh
                        test -x "$script" && sh "$script"
                echo "."