Magellan Linux

Diff of /trunk/installer-simple/bin/installer.sh.in

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

revision 2342 by niro, Fri Jan 3 14:57:23 2014 UTC revision 2397 by niro, Tue Jan 7 13:03:58 2014 UTC
# Line 16  INSTALLER_LIBDIR="%LIBDIR%" Line 16  INSTALLER_LIBDIR="%LIBDIR%"
16  # -> now in images.conf  # -> now in images.conf
17  CURRENTLINE=0  CURRENTLINE=0
18    
19    die()
20    {
21     echo "Error: $@"
22     exit 1
23    }
24    
25  # configuration  # configuration
26  if [ -e %SYSCONFDIR%/installer.conf ]  if [ -e %SYSCONFDIR%/installer.conf ]
27  then  then
# Line 46  source ${INSTALLER_LIBDIR}/functions/hwd Line 52  source ${INSTALLER_LIBDIR}/functions/hwd
52  VERSION="%VERSIONTAG%"  VERSION="%VERSIONTAG%"
53  TITLE="${DEFAULT_TITLE} - ${VERSION}"  TITLE="${DEFAULT_TITLE} - ${VERSION}"
54    
55  CDPATH="${DEFAULT_CDPATH}"  CDROOT="${DEFAULT_CDROOT}"
56  INSTALLROOT="${DEFAULT_INSTALLROOT}"  INSTALLROOT="${DEFAULT_INSTALLROOT}"
57    
58  # standard kernel opts  # standard kernel opts
# Line 70  FORMAT_FILESYSTEM="${DEFAULT_FILESYSTEM} Line 76  FORMAT_FILESYSTEM="${DEFAULT_FILESYSTEM}
76  #  DIALOG BOXEN #  #  DIALOG BOXEN #
77  #################################################  #################################################
78    
 die()  
 {  
  echo "Error: $@"  
  exit 1  
 }  
   
79  dialog_die()  dialog_die()
80  {  {
81   ERROR="$1"   ERROR="$1"
# Line 180  dialog_hardware_detection() Line 180  dialog_hardware_detection()
180   local i   local i
181   local hwtmp   local hwtmp
182    
183   if [ -x $(which mktemp &> /dev/null) ]   if [ -x $(type -P mktemp) ]
184   then   then
185   hwtmp="$(mktemp)"   hwtmp="$(mktemp)"
186   else   else
187   hwtmp="/tmp/hwtmp.sh"   hwtmp="/tmp/hwtmp.sh"
188   fi   fi
189    
190   [[ ! -z ${installdevs} ]] && installdevs=""   run_hardware_detection_disks
191    
192   echo "dialog \\"  > ${hwtmp}   echo "dialog \\"  > ${hwtmp}
193   echo "--backtitle \"${TITLE}\" \\" >> ${hwtmp}   echo "--backtitle \"${TITLE}\" \\" >> ${hwtmp}
# Line 197  dialog_hardware_detection() Line 197  dialog_hardware_detection()
197   echo "--msgbox \"Gefundene Hardware:\n\n \\" >> ${hwtmp}   echo "--msgbox \"Gefundene Hardware:\n\n \\" >> ${hwtmp}
198   echo " Festplatten:\n \\" >> ${hwtmp}   echo " Festplatten:\n \\" >> ${hwtmp}
199    
200   if [[ ! -z ${scsidisks} ]]   if [[ ! -z ${ALL_DISKS} ]]
201   then   then
202   for i in ${scsidisks}   for i in ${ALL_DISKS}
203   do   do
204   if [[ ${i} != ${cdromdev} ]]   echo " \\Z3${i}\\Zn\n \\" >> ${hwtmp}
  then  
  echo " \\Z7SCSI: \\Z3${i}\\Zn\n \\" >> ${hwtmp}  
  installdevs="${installdevs} ${i}"  
  fi  
205   done   done
206   fi   fi
207    
208   if [[ ! -z ${idedisks} ]]   if [[ ! -z ${ALL_CDROMS} ]]
209   then   then
210   for i in ${idedisks}   echo " \n \\" >> ${hwtmp}
211     echo " CDROM Laufwerke:\n \\" >> ${hwtmp}
212     for i in ${ALL_CDROMS}
213   do   do
214   if [[ ${i} != ${cdromdev} ]]   echo " \\Z3${i}\\Zn\n \\" >> ${hwtmp}
  then  
  echo " \\Z7IDE:  \\Z3${i}\\Zn\n \\" >> ${hwtmp}  
  installdevs="${installdevs} ${i}"  
  fi  
215   done   done
216   fi   fi
217    
  if [[ ! -z ${cdromdev} ]]  
  then  
  echo " \n \\" >> ${hwtmp}  
  echo " \\Z7andere Laufwerke:\n \\" >> ${hwtmp}  
  echo " CDROM: \\Z3${cdromdev}\\Zn\n \\" >> ${hwtmp}  
  fi  
   
218   # other devices   # other devices
219   run_hardware_detection   run_hardware_detection
220   case "${SPECIALDEVICE}" in   case "${SPECIALDEVICE}" in
# Line 367  dialog_setup_hdd_partitions_auto() Line 354  dialog_setup_hdd_partitions_auto()
354   fi   fi
355  }  }
356    
357    run_hardware_detection_disks()
358    {
359     local bootdev
360    
361     # all disks but exclude ramdisks
362     export ALL_DISKS=$(get_hwinfo disk | sed '/\/dev\/ram[0-9].*/d')
363     # remove the boot device from ALL_DISKS if it was an usbstick
364     if [[ $(grep '[[:space:]]/mnt/cdrom[[:space:]]' /proc/mounts | cut -d' ' -f3) != iso9660 ]]
365     then
366     bootdev="$(grep '[[:space:]]/mnt/cdrom[[:space:]]' /proc/mounts | cut -d' ' -f1 | sed 's:[0-9]::g')"
367     export ALL_DISKS=$(echo "${ALL_DISKS}" | grep -v "${bootdev}")
368     fi
369     export ALL_CDROMS="$(get_hwinfo cdrom)"
370    }
371    
372  dialog_setup_hdd_create_partitions()  dialog_setup_hdd_create_partitions()
373  {  {
374   dialog \   dialog \
# Line 652  install_mount_rootfs_flash() Line 654  install_mount_rootfs_flash()
654    
655  install_system_image()  install_system_image()
656  {  {
657   tar xvjpf ${CDPATH}/system/${CDIMAGENAME} -C ${INSTALLROOT}   tar xvjpf ${CDROOT}/system/${CDIMAGENAME} -C ${INSTALLROOT}
658  }  }
659    
660  install_bootsector_chroot()  install_bootsector_chroot()
# Line 829  CHROOTEOF Line 831  CHROOTEOF
831    
832  is_uuid_supported()  is_uuid_supported()
833  {  {
834   if [[ -x $(which busybox.mkinitrd &> /dev/null) ]]   if [[ -x $(type -P busybox.mkinitrd) ]]
835   then   then
836   # only detect uuids if supported   # only detect uuids if supported
837   if [[ ! -z $(busybox.mkinitrd | grep blkid) ]]   if [[ ! -z $(busybox.mkinitrd | grep blkid) ]]

Legend:
Removed from v.2342  
changed lines
  Added in v.2397