aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>1999-12-12 01:58:30 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>1999-12-12 01:58:30 +0000
commit278bd49cc83b35338aa406f0a889ce9679d3c78a (patch)
treed032a8bb50c80cbe1bfd4ad8f5887525889c36d6
parent378ece9d7bc44d329cdc8e3b90a03d373da2404c (diff)
Notes
-rw-r--r--etc/network.subr30
-rw-r--r--etc/rc.d/netoptions30
-rw-r--r--etc/rc.d/network130
-rw-r--r--etc/rc.d/network230
-rw-r--r--etc/rc.d/network330
-rw-r--r--etc/rc.d/routing30
-rw-r--r--etc/rc.network30
7 files changed, 133 insertions, 77 deletions
diff --git a/etc/network.subr b/etc/network.subr
index 72c72979c5c8..6985fd9aaef2 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -77,11 +77,11 @@ network_pass1() {
;;
esac
+ dhcp_interfaces=""
for ifn in ${network_interfaces}; do
- showstat=false
if [ -r /etc/start_if.${ifn} ]; then
. /etc/start_if.${ifn}
- showstat=true
+ eval showstat_$ifn=1
fi
# Do the primary ifconfig if specified
@@ -92,15 +92,22 @@ network_pass1() {
'')
;;
[Dd][Hh][Cc][Pp])
- ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${ifn}
- showstat=true
+ # DHCP inits are done all in one go below
+ dhcp_interfaces="$dhcp_interfaces $ifn"
+ eval showstat_$ifn=1
;;
*)
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
;;
esac
+ done
+
+ if [ ! -z "${dhcp_interfaces}" ]; then
+ ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces}
+ fi
+ for ifn in ${network_interfaces}; do
# Check to see if aliases need to be added
#
alias=0
@@ -108,7 +115,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args} alias
- showstat=true
+ eval showstat_$ifn=1
alias=`expr ${alias} + 1`
else
break;
@@ -120,14 +127,15 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_ipx
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
fi
+ done
- case ${showstat} in
- true)
+ for ifn in ${network_interfaces}; do
+ eval showstat=\$showstat_${ifn}
+ if [ ! -z ${showstat} ]; then
ifconfig ${ifn}
- ;;
- esac
+ fi
done
# Warm up user ppp if required, must happen before natd.
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions
index 72c72979c5c8..6985fd9aaef2 100644
--- a/etc/rc.d/netoptions
+++ b/etc/rc.d/netoptions
@@ -77,11 +77,11 @@ network_pass1() {
;;
esac
+ dhcp_interfaces=""
for ifn in ${network_interfaces}; do
- showstat=false
if [ -r /etc/start_if.${ifn} ]; then
. /etc/start_if.${ifn}
- showstat=true
+ eval showstat_$ifn=1
fi
# Do the primary ifconfig if specified
@@ -92,15 +92,22 @@ network_pass1() {
'')
;;
[Dd][Hh][Cc][Pp])
- ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${ifn}
- showstat=true
+ # DHCP inits are done all in one go below
+ dhcp_interfaces="$dhcp_interfaces $ifn"
+ eval showstat_$ifn=1
;;
*)
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
;;
esac
+ done
+
+ if [ ! -z "${dhcp_interfaces}" ]; then
+ ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces}
+ fi
+ for ifn in ${network_interfaces}; do
# Check to see if aliases need to be added
#
alias=0
@@ -108,7 +115,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args} alias
- showstat=true
+ eval showstat_$ifn=1
alias=`expr ${alias} + 1`
else
break;
@@ -120,14 +127,15 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_ipx
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
fi
+ done
- case ${showstat} in
- true)
+ for ifn in ${network_interfaces}; do
+ eval showstat=\$showstat_${ifn}
+ if [ ! -z ${showstat} ]; then
ifconfig ${ifn}
- ;;
- esac
+ fi
done
# Warm up user ppp if required, must happen before natd.
diff --git a/etc/rc.d/network1 b/etc/rc.d/network1
index 72c72979c5c8..6985fd9aaef2 100644
--- a/etc/rc.d/network1
+++ b/etc/rc.d/network1
@@ -77,11 +77,11 @@ network_pass1() {
;;
esac
+ dhcp_interfaces=""
for ifn in ${network_interfaces}; do
- showstat=false
if [ -r /etc/start_if.${ifn} ]; then
. /etc/start_if.${ifn}
- showstat=true
+ eval showstat_$ifn=1
fi
# Do the primary ifconfig if specified
@@ -92,15 +92,22 @@ network_pass1() {
'')
;;
[Dd][Hh][Cc][Pp])
- ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${ifn}
- showstat=true
+ # DHCP inits are done all in one go below
+ dhcp_interfaces="$dhcp_interfaces $ifn"
+ eval showstat_$ifn=1
;;
*)
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
;;
esac
+ done
+
+ if [ ! -z "${dhcp_interfaces}" ]; then
+ ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces}
+ fi
+ for ifn in ${network_interfaces}; do
# Check to see if aliases need to be added
#
alias=0
@@ -108,7 +115,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args} alias
- showstat=true
+ eval showstat_$ifn=1
alias=`expr ${alias} + 1`
else
break;
@@ -120,14 +127,15 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_ipx
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
fi
+ done
- case ${showstat} in
- true)
+ for ifn in ${network_interfaces}; do
+ eval showstat=\$showstat_${ifn}
+ if [ ! -z ${showstat} ]; then
ifconfig ${ifn}
- ;;
- esac
+ fi
done
# Warm up user ppp if required, must happen before natd.
diff --git a/etc/rc.d/network2 b/etc/rc.d/network2
index 72c72979c5c8..6985fd9aaef2 100644
--- a/etc/rc.d/network2
+++ b/etc/rc.d/network2
@@ -77,11 +77,11 @@ network_pass1() {
;;
esac
+ dhcp_interfaces=""
for ifn in ${network_interfaces}; do
- showstat=false
if [ -r /etc/start_if.${ifn} ]; then
. /etc/start_if.${ifn}
- showstat=true
+ eval showstat_$ifn=1
fi
# Do the primary ifconfig if specified
@@ -92,15 +92,22 @@ network_pass1() {
'')
;;
[Dd][Hh][Cc][Pp])
- ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${ifn}
- showstat=true
+ # DHCP inits are done all in one go below
+ dhcp_interfaces="$dhcp_interfaces $ifn"
+ eval showstat_$ifn=1
;;
*)
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
;;
esac
+ done
+
+ if [ ! -z "${dhcp_interfaces}" ]; then
+ ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces}
+ fi
+ for ifn in ${network_interfaces}; do
# Check to see if aliases need to be added
#
alias=0
@@ -108,7 +115,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args} alias
- showstat=true
+ eval showstat_$ifn=1
alias=`expr ${alias} + 1`
else
break;
@@ -120,14 +127,15 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_ipx
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
fi
+ done
- case ${showstat} in
- true)
+ for ifn in ${network_interfaces}; do
+ eval showstat=\$showstat_${ifn}
+ if [ ! -z ${showstat} ]; then
ifconfig ${ifn}
- ;;
- esac
+ fi
done
# Warm up user ppp if required, must happen before natd.
diff --git a/etc/rc.d/network3 b/etc/rc.d/network3
index 72c72979c5c8..6985fd9aaef2 100644
--- a/etc/rc.d/network3
+++ b/etc/rc.d/network3
@@ -77,11 +77,11 @@ network_pass1() {
;;
esac
+ dhcp_interfaces=""
for ifn in ${network_interfaces}; do
- showstat=false
if [ -r /etc/start_if.${ifn} ]; then
. /etc/start_if.${ifn}
- showstat=true
+ eval showstat_$ifn=1
fi
# Do the primary ifconfig if specified
@@ -92,15 +92,22 @@ network_pass1() {
'')
;;
[Dd][Hh][Cc][Pp])
- ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${ifn}
- showstat=true
+ # DHCP inits are done all in one go below
+ dhcp_interfaces="$dhcp_interfaces $ifn"
+ eval showstat_$ifn=1
;;
*)
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
;;
esac
+ done
+
+ if [ ! -z "${dhcp_interfaces}" ]; then
+ ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces}
+ fi
+ for ifn in ${network_interfaces}; do
# Check to see if aliases need to be added
#
alias=0
@@ -108,7 +115,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args} alias
- showstat=true
+ eval showstat_$ifn=1
alias=`expr ${alias} + 1`
else
break;
@@ -120,14 +127,15 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_ipx
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
fi
+ done
- case ${showstat} in
- true)
+ for ifn in ${network_interfaces}; do
+ eval showstat=\$showstat_${ifn}
+ if [ ! -z ${showstat} ]; then
ifconfig ${ifn}
- ;;
- esac
+ fi
done
# Warm up user ppp if required, must happen before natd.
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index 72c72979c5c8..6985fd9aaef2 100644
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -77,11 +77,11 @@ network_pass1() {
;;
esac
+ dhcp_interfaces=""
for ifn in ${network_interfaces}; do
- showstat=false
if [ -r /etc/start_if.${ifn} ]; then
. /etc/start_if.${ifn}
- showstat=true
+ eval showstat_$ifn=1
fi
# Do the primary ifconfig if specified
@@ -92,15 +92,22 @@ network_pass1() {
'')
;;
[Dd][Hh][Cc][Pp])
- ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${ifn}
- showstat=true
+ # DHCP inits are done all in one go below
+ dhcp_interfaces="$dhcp_interfaces $ifn"
+ eval showstat_$ifn=1
;;
*)
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
;;
esac
+ done
+
+ if [ ! -z "${dhcp_interfaces}" ]; then
+ ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces}
+ fi
+ for ifn in ${network_interfaces}; do
# Check to see if aliases need to be added
#
alias=0
@@ -108,7 +115,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args} alias
- showstat=true
+ eval showstat_$ifn=1
alias=`expr ${alias} + 1`
else
break;
@@ -120,14 +127,15 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_ipx
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
fi
+ done
- case ${showstat} in
- true)
+ for ifn in ${network_interfaces}; do
+ eval showstat=\$showstat_${ifn}
+ if [ ! -z ${showstat} ]; then
ifconfig ${ifn}
- ;;
- esac
+ fi
done
# Warm up user ppp if required, must happen before natd.
diff --git a/etc/rc.network b/etc/rc.network
index 72c72979c5c8..6985fd9aaef2 100644
--- a/etc/rc.network
+++ b/etc/rc.network
@@ -77,11 +77,11 @@ network_pass1() {
;;
esac
+ dhcp_interfaces=""
for ifn in ${network_interfaces}; do
- showstat=false
if [ -r /etc/start_if.${ifn} ]; then
. /etc/start_if.${ifn}
- showstat=true
+ eval showstat_$ifn=1
fi
# Do the primary ifconfig if specified
@@ -92,15 +92,22 @@ network_pass1() {
'')
;;
[Dd][Hh][Cc][Pp])
- ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${ifn}
- showstat=true
+ # DHCP inits are done all in one go below
+ dhcp_interfaces="$dhcp_interfaces $ifn"
+ eval showstat_$ifn=1
;;
*)
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
;;
esac
+ done
+
+ if [ ! -z "${dhcp_interfaces}" ]; then
+ ${dhcp_program:-/sbin/dhclient} ${dhcp_flags} ${dhcp_interfaces}
+ fi
+ for ifn in ${network_interfaces}; do
# Check to see if aliases need to be added
#
alias=0
@@ -108,7 +115,7 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args} alias
- showstat=true
+ eval showstat_$ifn=1
alias=`expr ${alias} + 1`
else
break;
@@ -120,14 +127,15 @@ network_pass1() {
eval ifconfig_args=\$ifconfig_${ifn}_ipx
if [ -n "${ifconfig_args}" ]; then
ifconfig ${ifn} ${ifconfig_args}
- showstat=true
+ eval showstat_$ifn=1
fi
+ done
- case ${showstat} in
- true)
+ for ifn in ${network_interfaces}; do
+ eval showstat=\$showstat_${ifn}
+ if [ ! -z ${showstat} ]; then
ifconfig ${ifn}
- ;;
- esac
+ fi
done
# Warm up user ppp if required, must happen before natd.