Date: Fri, 23 Dec 2011 18:42:15 +0400 From: Eygene Ryabinkin <rea@freebsd.org> To: Mike Telahun Makonnen <mtm@freebsd.org> Cc: Pyun Yong-Hyeon <pyunyh@gmail.com>, Doug Barton <dougb@freebsd.org>, freebsd-rc@freebsd.org, Garrett Cooper <yanegomi@gmail.com>, Gleb Smirnoff <glebius@FreeBSD.org>, d@delphij.net Subject: Re: Annoying ERROR: 'wlan0' is not a DHCP-enabled interface Message-ID: <wXz8hRW7xscoDCzsJ7uVCfYZgJ0@g5jH1yj%2BTnAiSdLOy3xs5Jutvhc> In-Reply-To: <CAEO0X8eRNwb1X76xwYnH=EA1t1M=uNN7p6V4%2BkDwAWO_AysuHA@mail.gmail.com> References: <4EC6C9A4.3000006@delphij.net> <CAGH67wRBBtKm5K8iNPpB2_JGwFnxL4Gif1gMxR0sPe=bro4Jdw@mail.gmail.com> <3EG8fAEe6lZEtr/D6Pw60YTcoYU@YnbH/K3/Y1Z96RV2jTofcGuSPJI> <CAEO0X8eRNwb1X76xwYnH=EA1t1M=uNN7p6V4%2BkDwAWO_AysuHA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--p2pkNiL1PnZBJ6Nr Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Resurrecting this old thread I abandoned due to the ENOTIME and adding to CC all people who were expressed interest in fixing the annoyances =66rom the devd caused by r226879. Sun, Nov 20, 2011 at 12:41:22PM +0300, Mike Telahun Makonnen wrote: > > I would say that my (ab)use of it in the patch perfectly fits the > > cited usage. =9AThat's not an excuse if the semantics of rc_quiet will > > be different from its current usage, but since we have no > > well-documented semantics apart from "Don't output some diagnostics" > > inside /etc/rc.subr, may be we can just extend this explanation based > > on the current usage and the common sense, add that to the manual page > > of rc.subr and go on? > > > > Any thoughts on this? >=20 > The rc_quiet knob was introduced to prevent devd spamming the console > when starting services that weren't enabled in rc.conf. It was also > overloaded to prevent unnecessary boot time clutter on the console. > The rationale was that if you set a service to start during boot you > don't want a gazillion "bar started" messages to cause the one "Error: > foo not started" message that you would really be interested in seeing > to scroll out of the screen buffer. It was used for this purpose in > several scripts in rc.d, but it caused quite a ruckus at the time (and > I was too distracted by other work to continue working on it) so its > use was mostly removed from the scripts under /etc/rc.d. OK, what about the following patch that documents the current usage of the "quiet" prefix and enables dhclient to recognize this modifier? Diff is available from http://codelabs.ru/fbsd/patches/dhclient/dhclient-respect-quiet-mode.diff Since the current rc.subr script has the following snippet, {{{ if [ -n "${rcvar}" -a "$rc_arg" !=3D "rcvar" -a "$rc_arg" != =3D "stop" ] || [ -n "${rcvar}" -a "$rc_arg" =3D "stop" -a -z "${rc_pid= }" ]; then if ! checkyesno ${rcvar}; then if [ -n "${rc_quiet}" ]; then return 0 fi echo -n "Cannot '${rc_arg}' $name. Set ${rc= var} to " echo -n "YES in /etc/rc.conf or use 'one${r= c_arg}' " echo "instead of '${rc_arg}'." return 0 fi fi }}} I think that error message about non-DHCP-enabled interface falls into the same category -- we have no "dhcp" modifier inside rc.conf, so we will fail loudly, unless we were asked to be quiet, just as in the above code. > It was not intended to mask "error" or "debug" messages. It is not my intention as well: I care about masking only certain classes of error and informational messages with rc_quiet; my patch to rc.subr.8 documents all current cases where it is appropriate. > As far as I can tell this discussion affects two groups of people: > 1. You didn't configure dhcp on an interface > 2. You *thought* you configured an interface for dhcp but it's not > getting an address and there is no feedback > if you're in group 1 you *don't* want to see a message that says the > interface is not configured for dhcp. > If you're in group 2 you *do" want to know. >=20 > So, is it more annoying for those in group 1 to get a message about > dhcp not being set every time an interface is started or for those in > group 2 to try to start an interface and not get any feedback when > dhcp is not enabled? The problem with the first group of people is a bit different, because people who didn't configured DHCP are getting notifications only from devd, because it reacts on every "interface up" event by invoking dhclient rc.d script on the interface. But here we have the "quiet" prefix handy. The second group's problem is the one you pronounced. And I think that people should have diagnostics in this case no matter what. It is the internal problem of the devd that spams the first group of people, but it shouldn't be fixed by not letting the second group of people to see the real error message and scratching their heads. --=20 Eygene Ryabinkin ,,,^..^,,, [ Life's unfair - but root password helps! | codelabs.ru ] [ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ] --p2pkNiL1PnZBJ6Nr Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EAREIAAYFAk70k0cACgkQFq+eroFS7PuaFwEAlF9kMsvnDEO9mVxbIxd5uDwI vcIXltnwXjAzKPAqdxAA/RA+JwuOpePhDsVO5MRiidjtuGLjk6EgRnjO0QeDfILx =iSrQ -----END PGP SIGNATURE----- --p2pkNiL1PnZBJ6Nr--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?wXz8hRW7xscoDCzsJ7uVCfYZgJ0>