Magellan Linux

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

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

revision 2439 by niro, Tue Jan 7 14:37:35 2014 UTC revision 2489 by niro, Wed Jan 8 12:14:37 2014 UTC
# Line 7  Line 7 
7  # Niels Rogalla <niro@magellan-linux.de>  # Niels Rogalla <niro@magellan-linux.de>
8  #  #
9    
10  # ignore the environment  # setup locales
11  LC_ALL=C  TEXTDOMAIN=installer
12    LC_MESSAGES=C
13    
14  # include dir  # include dir
15  INSTALLER_LIBDIR="%LIBDIR%"  INSTALLER_LIBDIR="%LIBDIR%"
16    
# Line 70  SPECIALDEVICE="" Line 72  SPECIALDEVICE=""
72  FORMFACTOR="${DEFAULT_FORMFACTOR}"  FORMFACTOR="${DEFAULT_FORMFACTOR}"
73  FORMAT_FILESYSTEM="${DEFAULT_FILESYSTEM}"  FORMAT_FILESYSTEM="${DEFAULT_FILESYSTEM}"
74    
75  #################################################  
76  #  DIALOG BOXEN #  ### helper scripts ###
 #################################################  
77    
78  trap_exit()  trap_exit()
79  {  {
# Line 86  trap_exit() Line 87  trap_exit()
87   exit 1   exit 1
88  }  }
89    
 dialog_die()  
 {  
  ERROR="$1"  
  RETVAL="$?"  
  dialog_install_failure  
  exit 1  
 }  
   
 dialog_warning()  
 {  
  local retval  
   
  yesnobox $"\Z1 !!! Warning !!! \Zn\n\n\This harddrive will be irreversibly erased.\n\n\Do you want to continue ?"  
  retval=$?  
  if [[ ${retval} -eq 1 ]]  
  then  
  clear  
  echo $"The process was aborted."  
  exit 1  
  fi  
 }  
   
 dialog_setup_hdd_info()  
 {  
  local SHDD="${HDD//\/dev\/}"  
   
  messagebox -h $"[ Harddrive partitioning ]" \  
  $"\nPlease create 1 partition.\n\n\[ \Z3${SHDD}1\Zn ] type: \Z3linux\Zn with the whole diskspace\n\Please mark ${SHDD}1 \Z3bootable\Zn."  
 }  
   
 dialog_setup_hdd_info_auto()  
 {  
  local SHDD="${HDD//\/dev\/}"  
   
  messagebox -h $"[ Harddrive partitioning ]" \  
  $"\Z1Warning!\Zn\n\nAll data on disk [ \Z3${HDD}\Zn ] will be erased!"  
 }  
   
 dialog_setup_system_menu()  
 {  
  local mode  
  local retval  
   
  mode=$(menubox -h $"[ Harddrive partitioning ]" $"\nSelect an installation mode" \  
  $"1:Automatic setup (recommended)" \  
  ":" \  
  $":\Z1Expert modes:\Zn" \  
  $"2:Common IDE-disk (manual setup)")  
  retval=$?  
  [[ ${retval} -eq 1 ]] && return 1  
  if [[ ${retval} -eq 0 ]]  
  then  
  case "${mode}" in  
  "1") run_install_auto ;;  
  "2") run_install_normal ;;  
  "") dialog_setup_system_menu;;  
  esac  
  fi  
 }  
   
 dialog_hardware_detection()  
 {  
  local message  
   
  run_hardware_detection_disks  
   
  message+=$"Harddrives:\n"  
   
  if [[ ! -z ${ALL_DISKS} ]]  
  then  
  for i in ${ALL_DISKS}  
  do  
  message+="\Z3${i}\Zn "  
  done  
  message+="\n"  
  fi  
   
  if [[ ! -z ${ALL_CDROMS} ]]  
  then  
  message+="\n"  
  message+=$"Optical disk drives:\n"  
  for i in ${ALL_CDROMS}  
  do  
  message+="\Z3${i}\Zn"  
  done  
  message+="\n"  
  fi  
   
  # other devices  
  run_hardware_detection  
  case "${SPECIALDEVICE}" in  
  zotac*) message+=$"\n\Z2Zotac device detected.\Zn" ;;  
  rangee) message+=$"\n\Z2Rangee device detected.\Zn" ;;  
  maxdata) message+=$"\n\Z2Maxdata device detected.\Zn" ;;  
  *) message+=$"\n \\ZnCommon device detected.\Zn" ;;  
  esac  
  if [[ ${FORMFACTOR} = laptop ]]  
  then  
  message+=$"\n\ZnFormfactor Laptop, activating 'ondemand' powersaving  mode.\Zn"  
  fi  
   
  messagebox -y 15 -h $"Detected hardware:" "${message}"  
 }  
   
 dialog_setup_hdd_partitions_manual()  
 {  
  local i  
  local retval  
   
  if [[ -z ${ALL_DISKS} ]]  
  then  
  dialog_no_harddrive_found  
  exit 1  
  else  
  HDD=$(dialog_select_target_harddrive)  
  retval=$?  
  [[ ${retval} -eq 1 ]] && return 1  
  if [[ ${retval} -eq 0 ]]  
  then  
  dialog_setup_hdd_info  
  setup_hdd_partitions_manual  
  fi  
  fi  
 }  
   
 dialog_setup_hdd_partitions_auto()  
 {  
  local i  
  local retval  
   
  if [[ -z ${ALL_DISKS} ]]  
  then  
  dialog_no_harddrive_found  
  exit 1  
  else  
  HDD=$(dialog_select_target_harddrive)  
  retval=$?  
  [[ ${retval} -eq 1 ]] && return 1  
  if [[ ${retval} -eq 0 ]]  
  then  
  dialog_setup_hdd_info_auto  
  dialog_setup_hdd_create_partitions  
  setup_hdd_partitions_auto  
  fi  
  fi  
 }  
   
90  install_meter()  install_meter()
91  {  {
92   while [[ ${CURRENTLINE} != ${TOTALLINES} ]]   while [[ ${CURRENTLINE} != ${TOTALLINES} ]]
# Line 246  install_meter() Line 100  install_meter()
100   return 0   return 0
101  }  }
102    
103  dialog_main()  mount_rootfs()
104  {  {
  local method=0  
105   local retval   local retval
106    
107   while [[ ${method} -le 2 ]]   if is_mounted --location "${INSTALLROOT}"
108   do   then
109   method=$(menubox $"Configuration:" \   echo $"${INSTALLROOT} already mounted" >&2
110   $"1:Install system" \   else
111   $"2:Show detected harddrives" \   mount "${ROOTHDD}" "${INSTALLROOT}" || dialog_die $"Could not mount rootfs - drive'${ROOTHDD}' -> '${INSTALLROOT}'"
112   $"3:Exit and reboot" \   fi
113   $"4:Exit and drop into a shell")   [[ -d ${INSTALLROOT}/boot ]] || install -d ${INSTALLROOT}/boot
114   retval=$?  }
115   [[ ${retval} -eq 1 ]] && exit 1  
116   if [[ ${retval} -eq 0 ]]  umount_rootfs()
117   then  {
118   case ${method} in   is_mounted --location ${INSTALLROOT}/boot && umount ${INSTALLROOT}/boot
119   "1") dialog_setup_system_menu ;;   is_mounted --location ${INSTALLROOT} && umount ${INSTALLROOT}
120   "2") dialog_hardware_detection ;;  }
121   "3") install_do_reboot ;;  
122   "4") /bin/bash --login -i ;;  install_do_reboot()
123   esac  {
124   fi   reboot
  done  
125  }  }
126    
 #################################################  
 # Install Komandos #  
 #################################################  
127  run_hardware_detection()  run_hardware_detection()
128  {  {
129   local hwinfo   local hwinfo
# Line 348  run_hardware_detection_disks() Line 197  run_hardware_detection_disks()
197   export ALL_CDROMS="$(get_hwinfo cdrom)"   export ALL_CDROMS="$(get_hwinfo cdrom)"
198  }  }
199    
 hdd_size_below_256mb()  
 {  
  local hdd="$1"  
  local size  
  local retval  
  [[ -z ${hdd} ]] && dialog_die "Error: get_hdd_size() no \$hdd given!"  
   
  size=$(fdisk -l ${hdd} | grep "Disk.*${hdd}" | sed 's:.*,\ \(.*\)\ byte.*:\1:')  
  if [[ ${size} -le 257000000 ]]  
  then  
  retval="0"  
  else  
  retval="1"  
  fi  
   
  return "${retval}"  
 }  
   
200  setup_hdd_partitions_auto()  setup_hdd_partitions_auto()
201  {  {
202   ROOTHDD="${HDD}1"   ROOTHDD="${HDD}1"
# Line 455  setup_hdd_format() Line 286  setup_hdd_format()
286   mkfs."${FORMAT_FILESYSTEM}" -q "${ROOTHDD}" || dialog_die   mkfs."${FORMAT_FILESYSTEM}" -q "${ROOTHDD}" || dialog_die
287  }  }
288    
 install_mount_rootfs()  
 {  
  is_mounted --location "${INSTALLROOT}" || mount "${ROOTHDD}" "${INSTALLROOT}"  
  install -d ${INSTALLROOT}/boot || dialog_die  
 }  
   
289  install_system_image()  install_system_image()
290  {  {
291   pushd ${INSTALLROOT} > /dev/null   pushd ${INSTALLROOT} > /dev/null
# Line 468  install_system_image() Line 293  install_system_image()
293   popd > /dev/null   popd > /dev/null
294  }  }
295    
296  install_bootsector_chroot()  install_system_settings()
297  {  {
298   local my_roothdd   local CONFIG
  local grubconf=${INSTALLROOT}/boot/grub/grub.conf  
  local grub2conf=/boot/grub/grub.cfg  
   
  # check for grub2  
  if [[ -f ${INSTALLROOT}/sbin/grub-mkconfig ]]  
  then  
  # needed by grub-mkconfig on the first run  
  if [[ ! -f ${INSTALLROOT}/boot/grub/video.lst ]]  
  then  
  install -m0644 ${INSTALLROOT}/lib/grub/*/video.lst ${INSTALLROOT}/boot/grub/video.lst || dialog_die  
  fi  
299    
300   # set kernelopts   # write fstab
301   if [[ -f ${INSTALLROOT}/etc/conf.d/grub ]]   CONFIG="${INSTALLROOT}/etc/fstab"
302   then   clearconfig
303   sed -i "s:^\(export GRUB_CMDLINE_LINUX_DEFAULT=\).*:\1\"${KERNELOPTS}\":" ${INSTALLROOT}/etc/conf.d/grub || dialog_die   addconfig -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1"
304   else   addconfig -e "proc\t/proc\tproc\tdefaults\t0 0"
305   echo "export GRUB_CMDLINE_LINUX_DEFAULT=\"${KERNELOPTS}\"" >  ${INSTALLROOT}/etc/conf.d/grub || dialog_die   addconfig -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0"
  fi  
  echo 'grub-mkdevicemap' > ${INSTALLROOT}/root/.installrc || dialog_die  
  echo "LC_ALL=C grub-mkconfig -o ${grub2conf}  &> /dev/null" >> ${INSTALLROOT}/root/.installrc || dialog_die  
  echo "grub-install --no-floppy ${HDD} &> /dev/null" >> ${INSTALLROOT}/root/.installrc || dialog_die  
  echo "exit 0" >> ${INSTALLROOT}/root/.installrc || dialog_die  
306    
307   # grub-legacy   # install network config skeleton
308   else   CONFIG="${INSTALLROOT}/etc/conf.d/net.eth0"
309   ### grubconf schreiben   clearconfig
310   source ${INSTALLROOT}/boot/kernelversion   addconfig 'ONBOOT="yes"'
311     addconfig 'NETWORKING="dhcp"'
312    
313   #for alx only   # intel framebuffer quirk
314   if [ -e ${INSTALLROOT}/etc/alx_version ]   if [ -e ${INSTALLROOT}/etc/splash/splash.conf ]
315     then
316     if [ -e /proc/fb ]
317   then   then
318   OLD_ALXVER="${ALXVER}"   if [[ ! -z $(grep 'inteldrmfb' /proc/fb) ]]
319   source ${INSTALLROOT}/etc/alx_version   then
320   KRNVER="ALX-${ALXVER}"   fbdev=$(grep 'inteldrmfb' /proc/fb | sed 's:\([0-9]\).*:\1:')
321   ALXVER="${OLD_ALXVER}"   if [[ ${fbdev} != 0 ]]
322     then
323     sed -i "s:^\(SPLASH_DEV=\).*:\1\"/dev/fb${fbdev}\":" ${INSTALLROOT}/etc/splash/splash.conf || dialog_die
324     fi
325     fi
326   fi   fi
327     fi
328    }
329    
  [[ -z ${KRNVER} ]] && KRNVER="AutoSta_LX"  
  [[ -z ${KRNINITRD} ]] && KRNINITRD="initrd"  
  [[ -z ${KRNIMG} ]] && KRNIMG="vmlinuz"  
   
  # uuid support  
  if is_uuid_supported  
  then  
  my_roothdd="UUID=$(get_uuid ${ROOTHDD})"  
  else  
  my_roothdd="${ROOTHDD}"  
  fi  
330    
331   : > ${grubconf} || dialog_die  ### installer dialogs ###
  echo "default 0" >> ${grubconf} || dialog_die  
  echo "timeout 3" >> ${grubconf} || dialog_die  
  # using current root password  
  echo "password --md5 $(cat ${INSTALLROOT}/etc/shadow | grep root | cut -d: -f2)"  >> ${grubconf} || dialog_die  
   
  echo  >> ${grubconf} || dialog_die  
  echo "# normal boot" >> ${grubconf} || dialog_die  
  echo "title ${KRNVER}" >> ${grubconf} || dialog_die  
  echo "root (hd0,0)" >> ${grubconf} || dialog_die  
  echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS} ${GRUBLEGACYOPTS}" >> ${grubconf} || dialog_die  
  if is_initrd_supported  
  then  
  echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || dialog_die  
  fi  
332    
333   echo >> ${grubconf} || dialog_die  dialog_die()
334   echo "# admin boot" >> ${grubconf} || dialog_die  {
335   echo "title ${KRNVER} - Re-run hardware-detection" >> ${grubconf} || dialog_die   ERROR="$1"
336   echo "lock"  >> ${grubconf} || dialog_die   RETVAL="$?"
337   echo "root (hd0,0)" >> ${grubconf} || dialog_die   dialog_install_failure
338   echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS} ${GRUBLEGACYOPTS} hardware-auto-detection" >> ${grubconf} || dialog_die   exit 1
339   if is_initrd_supported  }
  then  
  echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || dialog_die  
  fi  
340    
341   echo >> ${grubconf} || dialog_die  dialog_warning()
342   echo "title ${KRNVER} - Reset *all* local settings" >> ${grubconf} || dialog_die  {
343   echo "lock"  >> ${grubconf} || dialog_die   local retval
  echo "root (hd0,0)" >> ${grubconf} || dialog_die  
  echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS} ${GRUBLEGACYOPTS} alx-reset-settings" >> ${grubconf} || dialog_die  
  if is_initrd_supported  
  then  
  echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || dialog_die  
  fi  
344    
345   # bootsector schreiben chrooted schreiben (lfs/magellan)   yesnobox $"\Z1 !!! Warning !!! \Zn\n\n\This harddrive will be irreversibly erased.\n\n\Do you want to continue ?"
346   cat > ${INSTALLROOT}/root/.installrc << CHROOTEOF   retval=$?
347  /usr/sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null   if [[ ${retval} -eq 1 ]]
348  root (hd0,0)   then
349  setup (hd0)   clear
350  quit   echo $"The process was aborted."
351  EOF   exit 1
 exit 0  
 CHROOTEOF  
352   fi   fi
353    }
354    
  # run installrc  
  chrooted /bin/bash --rcfile /root/.installrc -i  
  rm ${INSTALLROOT}/root/.installrc  
 }  
   
 install_initrd_chroot()  
 {  
  # only generate initrds if the cmd exists  
  is_initrd_supported || return 0  
   
  DISKMODS="sd_mod"  
  OLDPATAMODS="amd74xx piix sis5513 via82cxxx"  
  PATAMODS="ata_piix pata_amd pata_mpiix pata_oldpiix pata_sis pata_via"  
  SATAMODS="sata_via sata_sis sata_nv"  
  DRMMODS="i915 mga nouveau r128 radeon savage sis tdfx ttm via"  
  OTHERMODS=""  
  case ${SPECIALDEVICE} in  
  zotac_intel) FBMODS=""; DRMMODS="i915" ;;  
  zotac_nvidia) FBMODS=""; DRMMODS="nouveau" ;;  
  rangee) FBMODS="" ;; ## fallback to vesafb, viafb does not run on all CLE266 boards  
  # not working with kms enabled drivers -> segfaults  
  #maxdata) FBMODS="i810fb" ;; ## check for maxdata / i810/ i815 Chipsets and disable KMS and use i810fb frambuffer  
  maxdata) FBMODS="" ;;  
  *) FBMODS="uvesafb" ;;  
  esac  
355    
356   if [[ ${FORMFACTOR} = laptop ]]  ### installer tasks ###
357    
358    task_setup_system_menu()
359    {
360     local mode
361     local retval
362    
363     mode="$(dialog_setup_system_menu)"
364     retval=$?
365     [[ ${retval} -eq 1 ]] && return 1
366     if [[ ${retval} -eq 0 ]]
367   then   then
368   OTHERMODS="acpi-cpufreq cpufreq_ondemand cpufreq_conservative cpufreq_powersave"   case "${mode}" in
369     "1") run_install_auto ;;
370     "2") run_install_normal ;;
371     "") task_setup_system_menu;;
372     esac
373   fi   fi
374    }
375    
376   # install an appropriate uvesafb.conf  task_hardware_detection()
377   install -d ${INSTALLROOT}/etc/modprobe.d || dialog_die  {
378   echo "options uvesafb mode_option=1024x768-32@60 scroll=ywrap" > ${INSTALLROOT}/etc/modprobe.d/uvesafb.conf || dialog_die   local message
379    
380   # install an appropriate viafb.conf   run_hardware_detection_disks
  echo "options viafb viafb_mode=1024x768 viafb_refresh=60" > ${INSTALLROOT}/etc/modprobe.d/viafb.conf || dialog_die  
381    
382   # install an appropriate i810fb.conf   message+=$"Harddrives:\n"
  echo "options i810fb xres=1024 yres=768 bpp=16 mtrr=1 hsync1=30 hsync2=62 vsync1=30 vsync2=60"  > ${INSTALLROOT}/etc/modprobe.d/i810fb.conf || dialog_die  
383    
384   cat > ${INSTALLROOT}/root/.installrc << CHROOTEOF   if [[ ! -z ${ALL_DISKS} ]]
385  echo "MODULES=\"${FORMAT_FILESYSTEM} ${DISKMODS} ${OLDATAMODS} ${PATAMODS} ${SATAMODS} ${DRMMODS} ${FBMODS} ${OTHERMODS}\"" > /etc/conf.d/mkinitrd   then
386  mkinitrd -f /boot/$(readlink /boot/initrd) $(readlink /boot/vmlinuz | sed "s:kernel-::g") > /dev/null   for i in ${ALL_DISKS}
387  exit 0   do
388  CHROOTEOF   message+="\Z3${i}\Zn "
389     done
390     message+="\n"
391     fi
392    
393   # run installrc   if [[ ! -z ${ALL_CDROMS} ]]
394   chrooted /bin/bash --rcfile /root/.installrc -i   then
395   rm ${INSTALLROOT}/root/.installrc   message+="\n"
396  }   message+=$"Optical disk drives:\n"
397     for i in ${ALL_CDROMS}
398     do
399     message+="\Z3${i}\Zn"
400     done
401     message+="\n"
402     fi
403    
404  is_uuid_supported()   # other devices
405  {   run_hardware_detection
406   if [[ -x $(type -P busybox.mkinitrd) ]]   case "${SPECIALDEVICE}" in
407     zotac*) message+=$"\n\Z2Zotac device detected.\Zn" ;;
408     rangee) message+=$"\n\Z2Rangee device detected.\Zn" ;;
409     maxdata) message+=$"\n\Z2Maxdata device detected.\Zn" ;;
410     *) message+=$"\n\ZnCommon device detected.\Zn" ;;
411     esac
412     if [[ ${FORMFACTOR} = laptop ]]
413   then   then
414   # only detect uuids if supported   message+=$"\n\ZnFormfactor Laptop, activating 'ondemand' powersaving mode.\Zn"
  if [[ ! -z $(busybox.mkinitrd | grep blkid) ]]  
  then  
  return 0  
  fi  
415   fi   fi
416    
417   return 1   messagebox -y 12 -h $"Detected hardware:" "${message}"
418  }  }
419    
420  install_system_settings()  task_setup_hdd_partitions_manual()
421  {  {
422   # schreibe fstab   local i
423   if is_uuid_supported   local retval
424    
425     if [[ -z ${ALL_DISKS} ]]
426   then   then
427   echo -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLROOT}/etc/fstab || dialog_die   dialog_no_harddrive_found
428     exit 1
429   else   else
430   echo -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLROOT}/etc/fstab || dialog_die   HDD=$(dialog_select_target_harddrive)
431     retval=$?
432     [[ ${retval} -eq 1 ]] && return 1
433     if [[ ${retval} -eq 0 ]]
434     then
435     dialog_setup_hdd_info
436     setup_hdd_partitions_manual
437     fi
438   fi   fi
439   # not needed busybox loads all with swapon -a, even if not mentioned in fstab  }
  #echo -e "UUID='$(get_uuid ${SWAPHDD})'\tswap\tswap\tpri=1\t0 0" >> ${INSTALLROOT}/etc/fstab || dialog_die  
  echo -e "proc\t/proc\tproc\tdefaults\t0 0" >> ${INSTALLROOT}/etc/fstab || dialog_die  
  echo -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0" >> ${INSTALLROOT}/etc/fstab || dialog_die  
440    
441   # install network config skeleton  task_setup_hdd_partitions_auto()
442   install -m0644 ${INSTALLROOT}/etc/alxconfig-ng/skel/net/net.eth0 ${INSTALLROOT}/etc/conf.d/ || dialog_die  {
443     local i
444     local retval
445    
446   # intel framebufer quirk   if [[ -z ${ALL_DISKS} ]]
  if [[ -e /proc/fb ]]  
447   then   then
448   if [[ ! -z $(grep 'inteldrmfb' /proc/fb) ]]   dialog_no_harddrive_found
449     exit 1
450     else
451     HDD=$(dialog_select_target_harddrive)
452     retval=$?
453     [[ ${retval} -eq 1 ]] && return 1
454     if [[ ${retval} -eq 0 ]]
455   then   then
456   fbdev=$(grep 'inteldrmfb' /proc/fb | sed 's:\([0-9]\).*:\1:')   dialog_setup_hdd_info_auto
457   if [[ ${fbdev} != 0 ]]   dialog_setup_hdd_create_partitions
458   then   setup_hdd_partitions_auto
  sed -i "s:^\(SPLASH_DEV=\).*:\1\"/dev/fb${fbdev}\":" ${INSTALLROOT}/etc/splash/splash.conf || dialog_die  
  fi  
459   fi   fi
460   fi   fi
461  }  }
462    
463  install_umount_rootfs()  task_main()
464  {  {
465   is_mounted --location ${INSTALLROOT}/boot && umount ${INSTALLROOT}/boot   local method=0
466   is_mounted --location ${INSTALLROOT} && umount ${INSTALLROOT}   local retval
 }  
467    
468  install_do_reboot()   while [[ ${method} -le 2 ]]
469  {   do
470   reboot   method=$(dialog_main)
471     retval=$?
472     [[ ${retval} -eq 1 ]] && exit 1
473     if [[ ${retval} -eq 0 ]]
474     then
475     case ${method} in
476     "1") task_setup_system_menu ;;
477     "2") task_hardware_detection ;;
478     "3") install_do_reboot ;;
479     "4") /bin/bash --login -i ;;
480     esac
481     fi
482     done
483  }  }
484    
 #################################################  
 #     Install Ablauf Scripte #  
 #################################################  
   
485  run_install_normal()  run_install_normal()
486  {  {
487   dialog_hardware_detection   task_hardware_detection
488    
489   dialog_setup_hdd_partitions_manual   task_setup_hdd_partitions_manual
490   dialog_setup_hdd_format   dialog_setup_hdd_format
491   setup_hdd_format > /dev/null   setup_hdd_format > /dev/null
492   install_mount_rootfs   mount_rootfs
493   (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | install_meter | dialog_install_system_image   (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | install_meter | dialog_install_system_image
494    
495   dialog_install_settings   dialog_install_settings
496   sleep 1   sleep 1
497   install_system_settings   install_system_settings
498   dialog_install_initrd   if is_initrd_supported
499   install_initrd_chroot   then
500     dialog_install_initrd
501     initrd_config
502     initrd_install
503     fi
504    
505   dialog_install_bootsector   dialog_install_bootsector
506   install_bootsector_chroot   bootloader_config
507     bootloader_install
508    
509   install_umount_rootfs   umount_rootfs
510   dialog_install_successful   dialog_install_successful
511  }  }
512    
513  run_install_auto()  run_install_auto()
514  {  {
515   dialog_hardware_detection   task_hardware_detection
516    
517   dialog_setup_hdd_partitions_auto   task_setup_hdd_partitions_auto
518   dialog_setup_hdd_format   dialog_setup_hdd_format
519   setup_hdd_format > /dev/null   setup_hdd_format > /dev/null
520   install_mount_rootfs   mount_rootfs
521   (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | install_meter | dialog_install_system_image   (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | install_meter | dialog_install_system_image
522    
523   dialog_install_settings   dialog_install_settings
524   sleep 1   sleep 1
525   install_system_settings   install_system_settings
526   dialog_install_initrd   if is_initrd_supported
527   install_initrd_chroot   then
528     dialog_install_initrd
529     initrd_config
530     initrd_install
531     fi
532    
533   dialog_install_bootsector   dialog_install_bootsector
534   install_bootsector_chroot   bootloader_config
535     bootloader_install
536    
537   install_umount_rootfs   umount_rootfs
538   dialog_install_successful   dialog_install_successful
539  }  }
540    
541  # set some proper traps  # set some proper traps
542  trap "trap_exit" SIGINT SIGQUIT  trap "trap_exit" SIGINT SIGQUIT
543    
544  dialog_main  task_main
545    
546  exit 0  exit 0

Legend:
Removed from v.2439  
changed lines
  Added in v.2489