Subject: Re: rc.subr don't check rcvar YES except at boot/shutdown
To: None <tech-userlevel@netbsd.org>
From: Lubomir Sedlacik <salo@Xtrmntr.org>
List: tech-userlevel
Date: 02/13/2007 16:25:36
--nqu5fpgjE+BQlEdo
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Index: rc.subr
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/etc/rc.subr,v
retrieving revision 1.68
diff -u -p -r1.68 rc.subr
--- rc.subr 27 Jan 2007 14:30:26 -0000 1.68
+++ rc.subr 13 Feb 2007 15:22:37 -0000
@@ -464,6 +464,10 @@ run_rc_command()
#
if [ -n "${rcvar}" -a "$rc_arg" !=3D "rcvar" ]; then
if ! checkyesno ${rcvar}; then
+ if [ -z $_run_rc_script ]; then
+ warn "\$${rcvar} is not enabled - see ${rcvar_manpage}."
+ warn "Use '${name} onestart' if you really mean it."
+ fi
return 0
fi
fi
@@ -704,6 +708,8 @@ $command $rc_flags $command_args"
#
run_rc_script()
{
+ _run_rc_script=3Dtrue
+
_file=3D$1
_arg=3D$2
if [ -z "$_file" -o -z "$_arg" ]; then
--=20
-- Lubomir Sedlacik <salo@{NetBSD,Xtrmntr,silcnet}.org> --
--nqu5fpgjE+BQlEdo
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)
iD8DBQFF0dhwiwjDDlS8cmMRAqXDAJwMli7PV45TWagk5J6/Yd0KlVXMKwCfev/e
zqZ0RleGffY0pXMySgu7Yd4=
=xuxM
-----END PGP SIGNATURE-----
--nqu5fpgjE+BQlEdo--