/[baselayout]/trunk/sh/net.sh
Gentoo

Diff of /trunk/sh/net.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2624 Revision 2668
57_wait_for_carrier() { 57_wait_for_carrier() {
58 local timeout= efunc=einfon 58 local timeout= efunc=einfon
59 59
60 _has_carrier && return 0 60 _has_carrier && return 0
61 61
62 eval timeout=\$carrier_timeout_${IF_VAR} 62 eval timeout=\$carrier_timeout_${IFVAR}
63 timeout=${timeout:-5} 63 timeout=${timeout:-${carrier_timeout:-5}}
64 64
65 # Incase users don't want this nice feature ...
66 [ ${timeout} -le 0 ] && return 0
67
65 [ -n "${RC_EBUFFER}" ] && efunc=einfo 68 [ -n "${RC_EBUFFER}" -o "${RC_PREFIX}" = "yes" ] && efunc=einfo
66 ${efunc} "Waiting for carrier (${timeout} seconds) " 69 ${efunc} "Waiting for carrier (${timeout} seconds) "
67 while [ ${timeout} -gt 0 ] ; do 70 while [ ${timeout} -gt 0 ] ; do
68 sleep 1 71 sleep 1
69 if _has_carrier ; then 72 if _has_carrier ; then
70 [ -z "${RC_EBUFFER}" ] && echo 73 [ -z "${RC_EBUFFER}" ] && echo
71 eend 0 74 eend 0
72 return 0 75 return 0
73 fi 76 fi
74 timeout=$((${timeout} - 1)) 77 timeout=$((${timeout} - 1))
75 [ -z "${RC_EBUFFER}" ] && printf "." 78 [ -z "${RC_EBUFFER}" -a "${RC_PREFIX}" != "yes" ] && printf "."
76 done 79 done
77 80
78 [ -z "${RC_EBUFFER}" ] && echo 81 [ -z "${RC_EBUFFER}" -a "${RC_PREFIX}" != "yes" ] && echo
79 eend 1 82 eend 1
80 return 1 83 return 1
81} 84}
82 85
83_netmask2cidr() { 86_netmask2cidr() {

Legend:
Removed from v.2624  
changed lines
  Added in v.2668

  ViewVC Help
Powered by ViewVC 1.1.20