summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/defaults/rc.conf1
-rw-r--r--etc/network.subr29
-rwxr-xr-xetc/pccard_ether4
-rw-r--r--share/man/man5/rc.conf.515
4 files changed, 40 insertions, 9 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index e56ac85..b6e2318 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -40,7 +40,6 @@ pccardd_flags="-z" # Additional flags for pccardd.
pccard_conf="/etc/defaults/pccard.conf" # pccardd(8) config file
powerd_enable="NO" # Run powerd to lower our power usage.
powerd_flags="" # Flags to powerd (if enabled).
-removable_interfaces="" # Removable network interfaces for /etc/pccard_ether.
removable_route_flush="YES" # Flush routes when removing an interface
tmpmfs="AUTO" # Set to YES to always create an mfs /tmp, NO to never
tmpsize="20m" # Size of mfs /tmp if created
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
diff --git a/etc/pccard_ether b/etc/pccard_ether
index d752055..04c6f76 100755
--- a/etc/pccard_ether
+++ b/etc/pccard_ether
@@ -61,8 +61,8 @@ shift
load_rc_config pccard_ether
-# Ignore interfaces not in removable_interfaces
-expr "${removable_interfaces}" : ".*${ifn}" > /dev/null || exit 0
+# Ignore interfaces with the NOAUTO keyword
+autoif $ifn || exit 0
if [ -n "$1" ]; then
usage
diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5
index d19fbe4..4a32866 100644
--- a/share/man/man5/rc.conf.5
+++ b/share/man/man5/rc.conf.5
@@ -215,10 +215,6 @@ is set to
these are the flags to pass to the
.Xr powerd 8
daemon.
-.It Va removable_interfaces
-.Pq Vt str
-List of removable network interfaces to be supported by
-.Pa /etc/pccard_ether .
.It Va tmpmfs
Controls the creation of a
.Pa /tmp
@@ -906,6 +902,17 @@ An
.Va ifconfig_ Ns Aq Ar interface
variable is also assumed to exist for each value of
.Ar interface .
+If the
+.Va ifconfig_ Ns Aq Ar interface
+contains the keyword
+.Dq Li "NOAUTO"
+then the interface will not be configured by
+at boot or by
+.Pa /etc/pccard_ether
+when
+.Va network_interfaces
+is set to
+.Dq Li "AUTO" .
It is also possible to add IP alias entries here in cases where
multiple IP addresses registered against a single interface
are desired.
OpenPOWER on IntegriCloud