summaryrefslogtreecommitdiffstats
path: root/etc/network.subr
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2005-08-24 01:23:49 +0000
committerbrooks <brooks@FreeBSD.org>2005-08-24 01:23:49 +0000
commitec73ff7b51b481542cac8b413f8135224dd6d5cb (patch)
treeeb2bb5b286d6b68110242871bc1f6b4e9bf5fb4d /etc/network.subr
parent09bbc99b5a768984ec43bc7dc4680a8a9f2311f9 (diff)
downloadFreeBSD-src-ec73ff7b51b481542cac8b413f8135224dd6d5cb.zip
FreeBSD-src-ec73ff7b51b481542cac8b413f8135224dd6d5cb.tar.gz
- Remove the removable_interfaces variable. /etc/pccard_ether will
now run on any interface. - Add a new ifconfig_<ifn> keyword, NOAUTO which prevents configuration of an interface at boot or via /etc/pccard_ether. This allows /etc/rc.d/netif to be used to start and stop an interface on a purely manual basis. The decision to affect pccard_ether may be revisited at a later date. Requested by: imp, gallatin (removable_interfaces) Discussed with: sam, Randy Bush (NOAUTO)
Diffstat (limited to 'etc/network.subr')
-rw-r--r--etc/network.subr29
1 files changed, 27 insertions, 2 deletions
diff --git a/etc/network.subr b/etc/network.subr
index b54cdbb..ed190bc 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -135,6 +135,8 @@ ifconfig_getargs()
case $_arg in
[Dd][Hh][Cc][Pp])
;;
+ [Nn][Oo][Aa][Uu][Tt][Oo])
+ ;;
[Ww][Pp][Aa])
;;
*)
@@ -146,6 +148,22 @@ ifconfig_getargs()
echo $_args
}
+# autoif
+# Returns 0 if the interface should be automaticly configured at
+# boot time and 1 otherwise.
+autoif()
+{
+ _tmpargs=`_ifconfig_getargs $1`
+ for _arg in $_tmpargs; do
+ case $_arg in
+ [Nn][Oo][Aa][Uu][Tt][Oo])
+ return 1
+ ;;
+ esac
+ done
+ return 0
+}
+
# dhcpif if
# Returns 0 if the interface is a DHCP interface and 1 otherwise.
dhcpif()
@@ -386,10 +404,17 @@ list_net_interfaces()
#
case ${network_interfaces} in
[Aa][Uu][Tt][Oo])
- _tmplist="`ifconfig -l`"
+ _prefix=''
+ _autolist="`ifconfig -l`"
+ for _if in ${_autolist} ; do
+ if autoif $_if; then
+ _tmplist="${_tmplist}${_prefix}${_if}"
+ [ -z "$_prefix" ] && _prefix=' '
+ fi
+ done
;;
*)
- _tmplist="${network_interfaces} ${removable_interfaces} ${cloned_interfaces}"
+ _tmplist="${network_interfaces} ${cloned_interfaces}"
;;
esac
OpenPOWER on IntegriCloud