FreeBSD Bugzilla – Attachment 164144 Details for
Bug 205263
Fix for netwait boot order issues and other bugs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
netwait fix patch
netwait-fix.patch (text/plain), 3.08 KB, created by
Brendan Molloy
on 2015-12-12 05:05:43 UTC
(
hide
)
Description:
netwait fix patch
Filename:
MIME Type:
Creator:
Brendan Molloy
Created:
2015-12-12 05:05:43 UTC
Size:
3.08 KB
patch
obsolete
>Index: NETWORKING >=================================================================== >--- NETWORKING (revision 292127) >+++ NETWORKING (working copy) >@@ -4,7 +4,7 @@ > # > > # PROVIDE: NETWORKING NETWORK >-# REQUIRE: netif netoptions routing ppp ipfw stf >+# REQUIRE: netif netwait netoptions routing ppp ipfw stf > # REQUIRE: defaultroute routed route6d mroute6d resolv bridge > # REQUIRE: static_arp static_ndp > >Index: netwait >=================================================================== >--- netwait (revision 292127) >+++ netwait (working copy) >@@ -3,7 +3,7 @@ > # $FreeBSD$ > # > # PROVIDE: netwait >-# REQUIRE: NETWORKING >+# BEFORE: routing > # KEYWORD: nojail > # > # The netwait script is intended to be used by systems which have >@@ -23,29 +23,25 @@ > { > local ip rc count output link > >- if [ -z "${netwait_ip}" ]; then >- err 1 "You must define one or more IP addresses in netwait_ip" >- fi >- > if [ ${netwait_timeout} -lt 1 ]; then > err 1 "netwait_timeout must be >= 1" > fi > >- # Handle SIGINT (Ctrl-C); force abort of while() loop >- trap break SIGINT >- > if [ -n "${netwait_if}" ]; then >- echo -n "Waiting for $netwait_if to have link" >+ echo "Waiting for $netwait_if to have link." > >+ # Handle SIGINT (Ctrl-C); force abort of while() loop >+ trap break SIGINT >+ > count=1 > while [ ${count} -le ${netwait_if_timeout} ]; do > if output=`/sbin/ifconfig ${netwait_if} 2>/dev/null`; then > link=`expr "${output}" : '.*[[:blank:]]status: \(no carrier\)'` > if [ -z "${link}" ]; then >- echo '.' >+ echo "Link acquired for $netwait_if." > break > fi >- else >+ elif [ ${count} -eq ${netwait_if_timeout} ]; then > echo '' > err 1 "ifconfig ${netwait_if} failed" > fi >@@ -64,34 +60,36 @@ > fi > fi > >- # Handle SIGINT (Ctrl-C); force abort of while() loop >- trap break SIGINT >+ if [ -n "${netwait_ip}" ]; then >+ # Handle SIGINT (Ctrl-C); force abort of for() loop >+ trap break SIGINT > >- for ip in ${netwait_ip}; do >- echo -n "Waiting for ${ip} to respond to ICMP" >+ for ip in ${netwait_ip}; do >+ echo -n "Waiting for ${ip} to respond to ICMP" > >- count=1 >- while [ ${count} -le ${netwait_timeout} ]; do >- /sbin/ping -t 1 -c 1 -o ${ip} >/dev/null 2>&1 >- rc=$? >+ count=1 >+ while [ ${count} -le ${netwait_timeout} ]; do >+ /sbin/ping -t 1 -c 1 -o ${ip} >/dev/null 2>&1 >+ rc=$? > >- if [ $rc -eq 0 ]; then >- # Restore default SIGINT handler >- trap - SIGINT >+ if [ $rc -eq 0 ]; then >+ # Restore default SIGINT handler >+ trap - SIGINT > >- echo '.' >- return >- fi >- count=$((count+1)) >+ echo '.' >+ return >+ fi >+ count=$((count+1)) >+ done >+ echo ': No response from host.' > done >- echo ': No response from host.' >- done > >- # Restore default SIGINT handler >- trap - SIGINT >+ # Restore default SIGINT handler >+ trap - SIGINT > >- warn "Exhausted IP list. Continuing with startup, but be aware you may" >- warn "not have a fully functional networking layer at this point." >+ warn "Exhausted IP list. Continuing with startup, but be aware you may" >+ warn "not have a fully functional networking layer at this point." >+ fi > } > > load_rc_config $name
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 205263
:
164144
|
164145
|
164165