Annoying ERROR: 'wlan0' is not a DHCP-enabled interface
Xin LI
delphij at delphij.net
Sun Nov 6 11:02:28 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
It seems that 226879 have introduced an error indication where if an
interface is up and is not set to DHCP, the devd invoked
/etc/rc.d/dhclient wlan0 call would generate an annoying message.
I think this message is not necessary at all -- normally
/etc/rc.d/dhclient is used by the system and it's just legitimate that
a network interface comes up and have not assigned as DHCP.
I'd like to propose the attached change, which turns this message into
debug message but keep the exit intact.
Comments?
Cheers,
- --
Xin LI <delphij at delphij.net> https://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)
iQEcBAEBCAAGBQJOtmk/AAoJEATO+BI/yjfBF3YIALd0n/Vl50oPuqVu1SJKv+2e
B29YaSmg+KwcusDNu51ixO8N0ax7DWMWg+fKz68GsSCBiybPcw7cR+aFOnIqLN2e
R9I31I0F6eemBlOKDN/XKeZcvA/17U9I1+yNK2xRzX1lsFU7pKSk8TiVIS6q+6X8
sN2xydQzwyAEq22/Q7uhO01QFUWArLMKFlc5xhYUBJ6UlfeHZ4phIrekMT1ZS63E
ZgAs160oMlxXlMF0PFGRJ0WGDOlvSG+3GVItK2LT4ZX1TfcDods690Aq/aNet5VG
p3rRMcXnQUzHnlu73kpg8itlkokcOmggEDzywhuyILsiByeIWQ+scxQfh3Afd8o=
=zSrM
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: etc/rc.d/dhclient
===================================================================
--- etc/rc.d/dhclient (revision 227146)
+++ etc/rc.d/dhclient (working copy)
@@ -22,7 +22,8 @@ stop_precmd="dhclient_pre_check"
dhclient_pre_check()
{
if [ -z "${rc_force}" ] && ! dhcpif $ifn; then
- err 1 "'$ifn' is not a DHCP-enabled interface"
+ debug "'$ifn' is not a DHCP-enabled interface"
+ exit 1
fi
}
More information about the freebsd-rc
mailing list