Magellan Linux

Diff of /alx-src/branches/alxconf-060/bin/alx-hwdetection.sh

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

revision 2622 by niro, Wed Jul 6 23:27:35 2011 UTC revision 4912 by niro, Wed May 29 09:31:01 2013 UTC
# Line 93  get_x11_driver_modules() Line 93  get_x11_driver_modules()
93   # use vesa if nothing was found   # use vesa if nothing was found
94   [[ -z ${modules} ]] && modules="vesa"   [[ -z ${modules} ]] && modules="vesa"
95    
96     # use openchrome module on dell optiplex fx130
97     if [[ ! -z $(hwinfo --bios | grep -i -A1 dell | grep -i fx130) ]]
98     then
99     modules="${modules//unichrome/openchrome}"
100     fi
101    
102   # remove duplicates from list and show it   # remove duplicates from list and show it
103   remove_duplicates "${modules}"   remove_duplicates "${modules}"
104  }  }
# Line 139  get_netcard_driver_modules() Line 145  get_netcard_driver_modules()
145   remove_duplicates "${modules}"   remove_duplicates "${modules}"
146  }  }
147    
148    get_system_type()
149    {
150     local hwinfo
151     local systemtype
152    
153     hwinfo="$(hwinfo --bios --storage)"
154    
155     if [[ ! -z $(echo "${hwinfo}" | grep -i zotac) ]]
156     then
157     systemtype="zotac"
158     elif [[ ! -z $(echo "${hwinfo}" | grep -i CLE266) ]]
159     then
160     systemtype="rangee"
161     elif [[ ! -z $(echo "${hwinfo}" | grep -i i810) ]]
162     then
163     systemtype="maxdata"
164     elif [[ ! -z $(echo "${hwinfo}" | grep -i i815) ]]
165     then
166     systemtype="maxdata"
167     else
168     systemtype="standard"
169     fi
170    
171     echo "${systemtype}"
172    }
173    
174    intel_framebuffer_quirk_required()
175    {
176     local retval=0
177     local fbdev
178    
179     if [[ -e /proc/fb ]]
180     then
181     if [[ ! -z $(grep 'inteldrmfb' /proc/fb) ]]
182     then
183     fbdev=$(grep 'inteldrmfb' /proc/fb | sed 's:\([0-9]\).*:\1:')
184     if [[ ${fbdev} != 0 ]]
185     then
186     retval="${fbdev}"
187     fi
188     fi
189     fi
190    
191     echo "${retval}"
192    }
193    
194  # debug  # debug
195  #echo "LAN:    $(get_netcard_driver_modules eth0)"  #echo "LAN:    $(get_netcard_driver_modules eth0)"
196  #echo "WLAN:   $(get_wlan_driver_modules wlan0)"  #echo "WLAN:   $(get_wlan_driver_modules wlan0)"
# Line 150  case $1 in Line 202  case $1 in
202   lan) get_netcard_driver_modules eth0 ;;   lan) get_netcard_driver_modules eth0 ;;
203   vga) get_x11_driver_modules ;;   vga) get_x11_driver_modules ;;
204   console) get_drm_driver_modules ;;   console) get_drm_driver_modules ;;
205     system) get_system_type ;;
206     intel-fb-quirk) intel_framebuffer_quirk_required ;;
207  esac  esac

Legend:
Removed from v.2622  
changed lines
  Added in v.4912