Magellan Linux

Diff of /trunk/initscripts/systemd/units/scripts/network.sh

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

revision 2304 by niro, Tue Apr 2 08:27:01 2013 UTC revision 2305 by niro, Thu Jan 2 13:28:42 2014 UTC
# Line 5  Line 5 
5  # get default settings  # get default settings
6  source /etc/conf.d/network  source /etc/conf.d/network
7    
8    wait_online()
9    {
10     local timeout="1"
11     local iface="$2"
12    
13     (( timeout *= 10 ))
14    
15     while [ ! -e /sys/class/net/${iface} ]
16     do
17     (( timeout-- > 0 )) || return 1
18     sleep 0.1
19     done
20    
21     return 0
22    }
23    
24  # read values from files  # read values from files
25  read_value()  read_value()
26  {  {
# Line 428  networking_start() Line 444  networking_start()
444   source /etc/conf.d/net.${iface} || exit 1   source /etc/conf.d/net.${iface} || exit 1
445   checkconfig   checkconfig
446    
447     # wait until the device is created
448     wait_online 5 "${iface}" || { echo "device '${iface}' does not exist"; continue; }
449    
450   # setup mac   # setup mac
451   if [[ -n ${FORCE_MAC_TO} ]]   if [[ -n ${FORCE_MAC_TO} ]]
452   then   then

Legend:
Removed from v.2304  
changed lines
  Added in v.2305