Date: Wed, 8 Nov 2017 16:53:12 +0000 (UTC) From: Eugene Grosbein <eugen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325559 - in head: etc share/man/man5 Message-ID: <201711081653.vA8GrCPH067778@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eugen Date: Wed Nov 8 16:53:11 2017 New Revision: 325559 URL: https://svnweb.freebsd.org/changeset/base/325559 Log: Add suitable knob ifconfig_<interface>_descr for static interface description. Document availability of interface descriptions within rc.conf(5). Approved by: avg (mentor), mav (mentor) MFC after: 3 days Modified: head/etc/network.subr head/share/man/man5/rc.conf.5 Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Wed Nov 8 16:45:53 2017 (r325558) +++ head/etc/network.subr Wed Nov 8 16:53:11 2017 (r325559) @@ -122,7 +122,7 @@ ifn_vnet0() # ifconfig_up() { - local _cfg _ipv6_opts ifconfig_args + local _cfg _ifconfig_descr _ipv6_opts ifconfig_args _cfg=1 # Make sure lo0 always comes up. @@ -213,6 +213,11 @@ ifconfig_up() ifalias $1 link alias ifalias $1 ether alias + + _ifconfig_descr=`get_if_var $1 ifconfig_IF_descr` + if [ -n "${_ifconfig_descr}" ]; then + ${IFCONFIG_CMD} $1 description "${_ifconfig_descr}" + fi if wpaif $1; then /etc/rc.d/wpa_supplicant start $1 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Wed Nov 8 16:45:53 2017 (r325558) +++ head/share/man/man5/rc.conf.5 Wed Nov 8 16:53:11 2017 (r325559) @@ -1616,6 +1616,23 @@ is set to 1. .Pp Default is .Dq Li NO . +.It Va ifconfig_ Ns Ao Ar interface Ac Ns _descr +.Pq Vt str +This assigns arbitrary description to an interface. +The +.Xr sysctl 8 +variable +.Va net.ifdescr_maxlen +limits its length. +This static setting may be overridden by commands +started with dynamic interface configuration utilities +like +.Xr dhclient 8 +hooks. The description can be seen with +.Xr ifconfig 8 +command and it may be exported with +.Xr bsnmpd 1 +daemon using its MIB-2 module. .It Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 .Pq Vt str IPv6 functionality on an interface should be configured by
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711081653.vA8GrCPH067778>