summaryrefslogtreecommitdiffstats
path: root/etc/network.subr
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2001-09-19 21:27:27 +0000
committerbrooks <brooks@FreeBSD.org>2001-09-19 21:27:27 +0000
commitdcf7dde14532f48c9adcdcea0805c4c998e25902 (patch)
tree1f57d5b3e387ce14a1f6e49b1a1f8efe697d0b60 /etc/network.subr
parentb0e7279ba20f9919fc823af5abb36352b0220380 (diff)
downloadFreeBSD-src-dcf7dde14532f48c9adcdcea0805c4c998e25902.zip
FreeBSD-src-dcf7dde14532f48c9adcdcea0805c4c998e25902.tar.gz
Add a new rc.conf variable, cloned_interfaces, to create cloned
interfaces at boot.
Diffstat (limited to 'etc/network.subr')
-rw-r--r--etc/network.subr11
1 files changed, 10 insertions, 1 deletions
diff --git a/etc/network.subr b/etc/network.subr
index 2bf0b58..b715539 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -127,6 +127,11 @@ network_pass1() {
;;
esac
+ # Attempt to create cloned interfaces.
+ for ifn in ${cloned_interfaces}; do
+ ifconfig ${ifn} create
+ done
+
# Special options for sppp(4) interfaces go here. These need
# to go _before_ the general ifconfig section, since in the case
# of hardwired (no link1 flag) but required authentication, you
@@ -151,6 +156,9 @@ network_pass1() {
[Aa][Uu][Tt][Oo])
network_interfaces="`ifconfig -l`"
;;
+ *)
+ network_interfaces="${network_interfaces} ${cloned_interfaces}"
+ ;;
esac
dhcp_interfaces=""
@@ -795,7 +803,8 @@ network_gif_setup() {
continue
;;
*)
- ifconfig $i create tunnel ${peers}
+ ifconfig $i create >/dev/null 2>&1
+ ifconfig $i tunnel ${peers}
;;
esac
done
OpenPOWER on IntegriCloud