Subject: Re: fix /etc/rc.d/swap[12] scripts to use correct load_rc_config
To: Jeremy C. Reed <reed@reedmedia.net>
From: Luke Mewburn <lukem@NetBSD.org>
List: tech-userlevel
Date: 09/21/2007 16:28:01
--ExXT7PjY8AI4Hyfa
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Sep 20, 2007 at 05:42:11PM -0500, Jeremy C. Reed wrote:
  | See this log message:
  |=20
  | ----------------------------
  | revision 1.4
  | date: 2000-07-17 05:27:04 -0700;  author: lukem;  state: Exp;  lines: +=
2 -2;
  | use "load_rc_config swap" for swap1 and swap2
  | ----------------------------
  |=20
  | Okay if I revert this to use ${name}? What was the purpose?

I don't recall the rationale for the commit (it was over seven years ago).
At a guess it was to ensure that /etc/rc.conf.d/swap was used
to be orthagonal with the lkm change you document below

I don't think that it's ok to revert the commit as-is, because there
may be people depending on the behaviour of using a shared rc.conf.d
file for both scripts.


  | It is misleading: as the admin assumes /etc/rc.conf.d/swap1 for swap1.

Said admin should have read the script more closely ;-)


  | Also it means the same stuff may happen twice.
  |=20
  | See PR #37009 if you want to see example.

So test $name in rc.conf.d/swap for "swap1" or "swap2".
That way you can continue to share /etc/rc.conf.d/swap
between both scripts, have different behaviour for each.

The existing behaviour has been there since the first release
that rc.d appeared in (NetBSD 1.5), and changing the rc.conf.d
filename now for minimal asthetic gain (given that you can
test $name as suggested above) doesn't seem like a "win" to me.



  | Also what about lkm1, lkm2, lkm3?
  | ----------------------------
  | revision 1.3
  | date: 2000-07-14 19:30:18 -0700;  author: lukem;  state: Exp;  lines: +=
2 -2;
  | share the same load_rc_config between the lkm* scripts
  | ----------------------------
  |=20
  | Is that okay too?

Don't change it for similar reasons as above.


cheers,
Luke.

--ExXT7PjY8AI4Hyfa
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)

iD8DBQFG82RwpBhtmn8zJHIRApgcAJ9mSCNLG5t215gdjeOHi9U7uBTcBACaAxPY
5axlvlx4C3gDsEEAsZEYW/Q=
=OO/S
-----END PGP SIGNATURE-----

--ExXT7PjY8AI4Hyfa--