Magellan Linux

Diff of /trunk/installer/hwdetection.sh

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

revision 572 by niro, Thu Sep 6 10:35:46 2007 UTC revision 575 by niro, Wed Sep 12 18:50:51 2007 UTC
# Line 5  Line 5 
5  # get_hwinfo $hw_item  # get_hwinfo $hw_item
6  get_hwinfo()  get_hwinfo()
7  {  {
8     local enable_desc="0"
9    
10     if [[ $1 = --with-description ]] || [[ $1 = -d ]]
11     then
12     enable_desc=1
13     shift
14     fi
15    
16   local item="$1"   local item="$1"
17   local all   local all
18   local i   local i
# Line 17  get_hwinfo() Line 25  get_hwinfo()
25   (( i++ ))   (( i++ ))
26   [ ${i} -eq 1 ] && continue   [ ${i} -eq 1 ] && continue
27    
28   echo "${device};${description}"   if [[ ${enable_desc} = 1 ]]
29     then
30     echo "${device};${description}"
31     else
32     echo "${device}"
33     fi
34   done <<< "${all}"   done <<< "${all}"
35  }  }
36    
# Line 44  get_driver_modules() Line 57  get_driver_modules()
57   local i   local i
58   for i in $(hwinfo --"${item}" | grep "Driver Modules:" | cut -d: -f2 )   for i in $(hwinfo --"${item}" | grep "Driver Modules:" | cut -d: -f2 )
59   do   do
60   eval $(echo "${i}" | sed -e "s:\":modules=\"\${modules}\ :" -e "s:\",\ \":\ :")   eval $(echo "${i}" | sed -e "s:\":modules=\"\${modules}\ :" -e "s:,:\ :")
61   done   done
62   echo "${modules}"   echo "${modules}"
63  }  }
# Line 65  remove_duplicates() Line 78  remove_duplicates()
78   done   done
79    
80   # remove all ':' and show the cleaned list   # remove all ':' and show the cleaned list
81   echo "${fixed_list}" | sed "s|:| |g"   # this way fixes double spaces also
82     for i in $(echo ${fixed_list} | sed "s|:| |g")
83     do
84     echo "${i}"
85     done
86  }  }
87    
88  get_x11_driver_modules()  get_x11_driver_modules()
# Line 147  create_initrd() Line 164  create_initrd()
164  #get_driver_modules all  #get_driver_modules all
165    
166  # network  # network
167  #get_hwinfo netcard  #get_hwinfo --with-description netcard
168  #get_driver_modules netcard  #get_driver_modules netcard
169    
170  #get_hwinfo disk  #get_hwinfo disk

Legend:
Removed from v.572  
changed lines
  Added in v.575