Date: Mon, 2 Feb 2004 14:51:24 -0500 From: Charles Swiger <cswiger@mac.com> To: ports@freebsd.org Cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= <des@des.no> Subject: Re: USE_RC_SUBR Message-ID: <2E8DD385-55B9-11D8-882E-003065ABFD92@mac.com> In-Reply-To: <xzpsmhuc7ot.fsf@dwp.des.no> References: <xzpsmhuef9m.fsf@dwp.des.no> <1075666428.89887.6.camel@shumai.marcuscom.com> <xzpsmhuc7ot.fsf@dwp.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 2, 2004, at 1:32 AM, Dag-Erling Sm=F8rgrav wrote: > Another issue with rc.subr is POLA. Previously, anything listed in > /usr/local/etc/rc.d would start at boot time (or when you ran the > script manually). Now, though, ports using rc.subr don't start unless > you explicitly enable them in /etc/rc.conf. The startup script will > simply do nothing, with no warning to the user. [ ... ] Strongly agreed. You've described the conflict with previous behavior=20= and user expectations admirably. > I'm not going to start an argument about the desirability of this; the > point is that people need to be made aware of it. Would something like this help: --- rc.subr~ Fri Sep 26 11:52:23 2003 +++ rc.subr Mon Feb 2 14:41:39 2004 @@ -516,6 +516,8 @@ # if [ -n "${rcvar}" -a "$rc_arg" !=3D "rcvar" ]; then if ! checkyesno ${rcvar}; then + echo "Unable to ${rc_arg} ${name}: ${rcvar} not=20= set." + echo "(Check /etc/rc.conf or try=20 'force${rc_arg}'...)" return 0 fi fi This addresses the concern of a startup script not doing anything and=20 not displaying any indication to the user that the command did not run.=20= It suggests to the user what they should change, and where, and also=20= tells them how to use something like "forcestart" or "forcestop" if=20 they still want to invoke the script manually. I that life would be better, or less astonishing :-), if rcvar=20 defaulted to "y" for manual invocation and for startup scripts in=20 /usr/local/etc/rc.d... --=20 -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2E8DD385-55B9-11D8-882E-003065ABFD92>