diff options
Diffstat (limited to 'etc/rc.d')
-rw-r--r-- | etc/rc.d/netoptions | 30 | ||||
-rw-r--r-- | etc/rc.d/network1 | 30 | ||||
-rw-r--r-- | etc/rc.d/network2 | 30 | ||||
-rw-r--r-- | etc/rc.d/network3 | 30 | ||||
-rw-r--r-- | etc/rc.d/routing | 30 |
5 files changed, 95 insertions, 55 deletions
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions index 72c7297..6985fd9 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 72c7297..6985fd9 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 72c7297..6985fd9 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 72c7297..6985fd9 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 72c7297..6985fd9 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. |