Magellan Linux

Diff of /trunk/installer-simple/functions/hwdetection.sh

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

revision 2465 by niro, Tue Jan 7 13:25:22 2014 UTC revision 2466 by niro, Tue Jan 7 20:47:16 2014 UTC
# Line 336  is_mounted() Line 336  is_mounted()
336   return 0   return 0
337  }  }
338    
339    iface_has_link()
340    {
341     local interface="$1"
342     local flags
343    
344     [[ -n ${interface} ]] || return 2
345     interface="/sys/class/net/${interface}"
346     [[ -d ${interface} ]] || return 2
347     flags=$(cat ${interface}/flags)
348     echo $((${flags}|0x41)) > ${interface}/flags # 0x41: IFF_UP|IFF_RUNNING
349     [[ $(cat ${interface}/carrier) = 1 ]] || return 1
350    }
351    
352  chrooted()  chrooted()
353  {  {
354   local cmd="$@"   local cmd="$@"

Legend:
Removed from v.2465  
changed lines
  Added in v.2466