Magellan Linux

Diff of /trunk/installer/include/hwdetection.sh

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

revision 1034 by niro, Sun May 30 17:49:14 2010 UTC revision 1035 by niro, Sun May 30 18:37:54 2010 UTC
# Line 75  get_driver_modules() Line 75  get_driver_modules()
75  {  {
76   local item="$1"   local item="$1"
77   local modules   local modules
   
  # being little tricky here :)  
  # does following:  
  # grep:  
  # -> 'Driver Modules: "via82cxxx", "ide_cd"'  
  # cut:  
  # -> ' "via82cxxx", "ide_cd"'  
  # sed1:  
  # -> ' modules="via82cxxx", "ide_cd"'  
  # sed2:  
  # -> ' modules="via82cxxx ide_cd"'  
  # then evaluate -> eval modules="via82cxxx ide_cd"  
  # and we get a variable $modules with all mods  
  #eval $(hwinfo --"${item}" | grep "Driver Modules:" | cut -d: -f2 | sed -e "s:\":modules=\":" -e "s:\",\ \":\ :")  
   
78   local i   local i
79    
80   for i in $(hwinfo --"${item}" | grep "Driver Modules:" | cut -d: -f2 )   for i in $(hwinfo --"${item}" | grep "Driver Modules:" | cut -d: -f2 )
81   do   do
82   eval $(echo "${i}" | sed -e "s:\":modules=\"\${modules}\ :" -e "s:,:\ :")   eval $(echo "${i}" | sed -e "s:\":modules=\"\${modules}\ :" -e "s:,:\ :")
# Line 248  create_initrd() Line 234  create_initrd()
234   for i in $*   for i in $*
235   do   do
236   case $1 in   case $1 in
  #--root|-r) shift; root="$1" ;;  
237   --initrd|-i) shift; initrd="$1" ;;   --initrd|-i) shift; initrd="$1" ;;
238   --config|-c) shift; config="$1" ;;   --config|-c) shift; config="$1" ;;
239   --kernelversion|-v) shift; kernel="$1" ;;   --kernelversion|-v) shift; kernel="$1" ;;
# Line 327  chrooted() Line 312  chrooted()
312   umount ${INSTALL_ROOT}/proc   umount ${INSTALL_ROOT}/proc
313   umount ${INSTALL_ROOT}/sys   umount ${INSTALL_ROOT}/sys
314  }  }
   
 # special: memory (size), floppy (modprobe floppy), smp (support y/n)  
 #          sound (which module? -> eval $(hwinfo --sound | grep "Driver Modules:" | cut -d: -f2 | sed s:\":a=\":) )  
 #  
   
 # for i in cdrom cpu disk floppy gfxcard keyboard memory monitor mouse  
 # netcard pppoe scsi smp \  
 # sound wlan  
 # do  
 # echo -------- ${i}  
 # get_hwinfo ${i}  
 # echo -------------------------------------------------  
 # echo  
 # done  
   
 # get_driver_modules sound  
 # get_driver_modules wlan  
 # get_driver_modules cdrom  
 # get_driver_modules disk  
 # get_driver_modules gfxcard  
 # get_x11_driver_modules  
   
 # # get a modules list  
 # for i in sound wlan cdrom disk gfxcard  
 # do  
 # ALL_MODULES="${ALL_MODULES} $(get_driver_modules ${i})"  
 # done  
 # ALL_MODULES="${ALL_MODULES} $(get_x11_driver_modules)"  
 # # show a clean list  
 # for i in $(remove_duplicates ${ALL_MODULES})  
 # do  
 # echo ${i}  
 # done  
   
 #create_initrd /root/TEST/initrd  
 #get_driver_modules cdrom  
 #get_driver_modules disk  
 #get_driver_modules scsi  
 #get_driver_modules all  
   
 # network  
 #get_hwinfo --with-description netcard  
 #get_driver_modules netcard  
   
 #get_hwinfo disk  
 #get_hwinfo partition | grep /dev/hda  

Legend:
Removed from v.1034  
changed lines
  Added in v.1035