Date: Mon, 26 Dec 2011 19:17:41 -0800 From: Doug Barton <dougb@FreeBSD.org> To: Eygene Ryabinkin <rea@freebsd.org> Cc: Pyun Yong-Hyeon <pyunyh@gmail.com>, d@delphij.net, Garrett Cooper <yanegomi@gmail.com>, Gleb Smirnoff <glebius@FreeBSD.org>, freebsd-rc@freebsd.org Subject: Re: Annoying ERROR: 'wlan0' is not a DHCP-enabled interface Message-ID: <4EF938D5.7060801@FreeBSD.org> In-Reply-To: <LADID%2BnpQnFYUAFjVHNVYJzo%2BFg@g5jH1yj%2BTnAiSdLOy3xs5Jutvhc> References: <n2Hlz4MXZMNcNzN56fSf6/or7Ig@YnbH/K3/Y1Z96RV2jTofcGuSPJI> <4EF6401E.3080902@FreeBSD.org> <20111224215649.GA12789@stack.nl> <4EF80CA7.3070303@FreeBSD.org> <ooDmUS7742YMCurT/5XDO19d%2BS4@g5jH1yj%2BTnAiSdLOy3xs5Jutvhc> <4EF82E3B.6040601@FreeBSD.org> <KjrN1twOoYYUBTKZXsHphbGonrU@g5jH1yj%2BTnAiSdLOy3xs5Jutvhc> <4EF833B7.9040704@FreeBSD.org> <0A59E5CD-3598-41B0-A707-6C5185E80043@gmail.com> <4EF83A59.8080008@FreeBSD.org> <LADID%2BnpQnFYUAFjVHNVYJzo%2BFg@g5jH1yj%2BTnAiSdLOy3xs5Jutvhc>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12/26/2011 01:52, Eygene Ryabinkin wrote: > Mon, Dec 26, 2011 at 01:11:53AM -0800, Doug Barton wrote: >> On 12/26/2011 01:02, Garrett Cooper wrote: >>> $ svn log -r 226879 >>> ------------------------------------------------------------------------ >>> >>> >> r226879 | rea | 2011-10-27 23:03:38 -0700 (Thu, 27 Oct 2011) | 10 lines >>> >>> Fix handling of rc_force in /etc/rc.d/dhclient >>> >>> Variable 'rc_force' is accessible only at the time of >>> rc_run_command, so it can't be examined from the script's main code. >>> >>> Spotted by: hrs Reviewed by: hrs, des Approved by: des MFC after: 2 >>> weeks >>> ------------------------------------------------------------------------ >>> >>> It simply didn't exist before this change; before it was just a >>> 'return 1', which is illegal outside of functions, amongst other >>> things. >> >> Ok, so I think here is some of the source of the confusion: > > Unlikely that the confusion will come from my side: I didn't say *you* were confused about this, I said "the confusion." :) > The whole story is the following one. Thanks for your background information. I dug through the svn logs and you are of course correct that the error message didn't exist prior to your change. However I think the error message is still valuable because it will catch problems such as: ifconfig_em0='DHPC' I just sent a response to delphij's original message with what I think is a better solution, attempt to more properly configure the interface from devd.conf in the first place. This avoids spuriously calling rc.d/dhclient. >>> So I vote to just remove the message (convert the err 1 to a exit 1) >> >> I haven't dug into it yet, but if it was a return previously it almost >> certainly should not be an exit now. > > Doug, I may be blunt now, but how can one ever say something about the > code that he hasn't digged into? I know about the common sense, but > it alone can't be applied to the non-trivial problems with any hope > for good results. Please note that I qualified my statement, precisely because I had not yet dug deeply into it. However, to answer your question "how can one ever say something about the code that he hasn't digged into?": 1. Years of experience 2. Depth of understanding of the rc.d code generally 3. A finely honed filter which detects "This smells like fixing a symptom rather than fixing the actual problem." In the end it seems that I was right, dhclient was the wrong place to address this issue. I even suggested that the proper place to fix it was in devd.conf. Now you can say that I just got lucky, but I would beg to differ. :) Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EF938D5.7060801>