Magellan Linux

Diff of /trunk/mkinitrd-magellan/livecd/linuxrc.sh

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

revision 605 by niro, Sat Nov 10 19:56:21 2007 UTC revision 671 by niro, Mon Jan 21 23:24:03 2008 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  # $Header: /home/cvsd/magellan-cvs/magellan-src/mkinitrd-magellan/livecd/linuxrc.sh,v 1.2 2007-11-10 19:56:21 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mkinitrd-magellan/livecd/linuxrc.sh,v 1.4 2008-01-21 23:24:03 niro Exp $
3    
4  # loads given kernel modules  # loads given kernel modules
5  load_kernel_modules()  load_kernel_modules()
# Line 45  check_drives() Line 45  check_drives()
45   then   then
46   echo -e "Magellan boot device found."   echo -e "Magellan boot device found."
47   BOOT_DEVICE="${dev}"   BOOT_DEVICE="${dev}"
48   FSTYPE=${fs}   FSTYPE="${fs}"
49   break   break
50   fi   fi
51   fi   fi
# Line 56  check_drives() Line 56  check_drives()
56  DOSCSI=no  DOSCSI=no
57  DOUSB=no  DOUSB=no
58  DOSATA=no  DOSATA=no
59    DOFB=no
60  NOPATA=no  NOPATA=no
61    FORCED_ROOTFS=""
62    
63  ## starts here ##  ## starts here ##
64    
# Line 80  do Line 82  do
82   dosata)   dosata)
83   DOSATA=yes   DOSATA=yes
84   ;;   ;;
85     dofb)
86     DOFB=yes
87     ;;
88   nopata)   nopata)
89   NOPATA=yes   NOPATA=yes
90   ;;   ;;
91     rootfs=*)
92     FORCED_ROOTFS="${i#*=}"
93     ;;
94   esac   esac
95  done  done
96    
97  # now load all needed modules  # now load all needed modules
98    [ "${DOFB}" = "yes" ] && load_kernel_modules "framebuffer"
99  load_kernel_modules "generic"  load_kernel_modules "generic"
100  [ "${NOPATA}" != "yes" ] && load_kernel_modules "pata"  [ "${NOPATA}" != "yes" ] && load_kernel_modules "pata"
101  [ "${DOSCSI}" = "yes" ] && load_kernel_modules "scsi"  [ "${DOSCSI}" = "yes" ] && load_kernel_modules "scsi"
# Line 117  echo "Searching for a boot device ..." Line 126  echo "Searching for a boot device ..."
126    
127  # searching usbstick  # searching usbstick
128  if [ "${DOUSB}" = "yes" ]; then  if [ "${DOUSB}" = "yes" ]; then
129   check_drives "/dev/sd*" "vfat"   ROOTFS="vfat"
130   check_drives "/dev/sg*" "vfat"   [[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}"
131     check_drives "/dev/sd*" "${ROOTFS}"
132     check_drives "/dev/sg*" "${ROOTFS}"
133  fi  fi
134    
135  # for cdrom_device in $CDROM_LIST (ide)  # for cdrom_device in $CDROM_LIST (ide)
136  check_drives "/dev/cdroms/*" iso9660  ROOTFS="iso9660"
137  check_drives "/dev/hd*" iso9660  [[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}"
138    check_drives "/dev/cdroms/*" "${ROOTFS}"
139    check_drives "/dev/hd*" "${ROOTFS}"
140    
141  # scsi cdroms  # scsi cdroms
142  if [ "${DOSCSI}" = "yes" ] || [ "${DOSATA}" = "yes" ]; then  if [ "${DOSCSI}" = "yes" ] || [ "${DOSATA}" = "yes" ]; then
143   check_drives "/dev/sr*" iso9660   ROOTFS="iso9660"
144   check_drives "/dev/sg*" iso9660   [[ -n ${FORCED_ROOTFS} ]] && ROOTFS="${FORCED_ROOTFS}"
145   check_drives "/dev/scd*" iso9660   check_drives "/dev/sr*" "${ROOTFS}"
146     check_drives "/dev/sg*" "${ROOTFS}"
147     check_drives "/dev/scd*" "${ROOTFS}"
148  fi  fi
149    
150  # mount our rootfs from cdrom  # mount our rootfs from cdrom

Legend:
Removed from v.605  
changed lines
  Added in v.671