Magellan Linux

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

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

revision 2438 by niro, Tue Jan 7 14:30:19 2014 UTC revision 2487 by niro, Wed Jan 8 12:11:44 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
299   local grubconf=${INSTALLROOT}/boot/grub/grub.conf  
300   local grub2conf=/boot/grub/grub.cfg   # write fstab
301     CONFIG="${INSTALLROOT}/etc/fstab"
302     clearconfig
303     addconfig -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1"
304     addconfig -e "proc\t/proc\tproc\tdefaults\t0 0"
305     addconfig -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0"
306    
307     # install network config skeleton
308     CONFIG="${INSTALLROOT}/etc/conf.d/net.eth0"
309     clearconfig
310     addconfig 'ONBOOT="yes"'
311     addconfig 'NETWORKING="dhcp"'
312    
313   # check for grub2   # intel framebuffer quirk
314   if [[ -f ${INSTALLROOT}/sbin/grub-mkconfig ]]   if [ -e ${INSTALLROOT}/etc/splash/splash.conf ]
315   then   then
316   # needed by grub-mkconfig on the first run   if [ -e /proc/fb ]
  if [[ ! -f ${INSTALLROOT}/boot/grub/video.lst ]]  
317   then   then
318   install -m0644 ${INSTALLROOT}/lib/grub/*/video.lst ${INSTALLROOT}/boot/grub/video.lst || dialog_die   if [[ ! -z $(grep 'inteldrmfb' /proc/fb) ]]
319     then
320     fbdev=$(grep 'inteldrmfb' /proc/fb | sed 's:\([0-9]\).*:\1:')
321     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    
  # set kernelopts  
  if [[ -f ${INSTALLROOT}/etc/conf.d/grub ]]  
  then  
  sed -i "s:^\(export GRUB_CMDLINE_LINUX_DEFAULT=\).*:\1\"${KERNELOPTS}\":" ${INSTALLROOT}/etc/conf.d/grub || dialog_die  
  else  
  echo "export GRUB_CMDLINE_LINUX_DEFAULT=\"${KERNELOPTS}\"" >  ${INSTALLROOT}/etc/conf.d/grub || dialog_die  
  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  
330    
331   # grub-legacy  ### installer dialogs ###
  else  
  ### grubconf schreiben  
  source ${INSTALLROOT}/boot/kernelversion  
332    
333   #for alx only  dialog_die()
334   if [ -e ${INSTALLROOT}/etc/alx_version ]  {
335   then   ERROR="$1"
336   OLD_ALXVER="${ALXVER}"   RETVAL="$?"
337   source ${INSTALLROOT}/etc/alx_version   dialog_install_failure
338   KRNVER="ALX-${ALXVER}"   exit 1
339   ALXVER="${OLD_ALXVER}"  }
  fi  
340    
341   [[ -z ${KRNVER} ]] && KRNVER="AutoSta_LX"  dialog_warning()
342   [[ -z ${KRNINITRD} ]] && KRNINITRD="initrd"  {
343   [[ -z ${KRNIMG} ]] && KRNIMG="vmlinuz"   local retval
344    
345   # uuid support   yesnobox $"\Z1 !!! Warning !!! \Zn\n\n\This harddrive will be irreversibly erased.\n\n\Do you want to continue ?"
346   if is_uuid_supported   retval=$?
347   then   if [[ ${retval} -eq 1 ]]
348   my_roothdd="UUID=$(get_uuid ${ROOTHDD})"   then
349   else   clear
350   my_roothdd="${ROOTHDD}"   echo $"The process was aborted."
351   fi   exit 1
352     fi
353    }
354    
  : > ${grubconf} || dialog_die  
  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  
355    
356   echo >> ${grubconf} || dialog_die  ### installer tasks ###
  echo "# admin boot" >> ${grubconf} || dialog_die  
  echo "title ${KRNVER} - Re-run hardware-detection" >> ${grubconf} || dialog_die  
  echo "lock"  >> ${grubconf} || dialog_die  
  echo "root (hd0,0)" >> ${grubconf} || dialog_die  
  echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS} ${GRUBLEGACYOPTS} hardware-auto-detection" >> ${grubconf} || dialog_die  
  if is_initrd_supported  
  then  
  echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || dialog_die  
  fi  
357    
358   echo >> ${grubconf} || dialog_die  task_setup_system_menu()
359   echo "title ${KRNVER} - Reset *all* local settings" >> ${grubconf} || dialog_die  {
360   echo "lock"  >> ${grubconf} || dialog_die   local mode
361   echo "root (hd0,0)" >> ${grubconf} || dialog_die   local retval
  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  
362    
363   # bootsector schreiben chrooted schreiben (lfs/magellan)   mode="$(dialog_setup_system_menu)"
364   cat > ${INSTALLROOT}/root/.installrc << CHROOTEOF   retval=$?
365  /usr/sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null   [[ ${retval} -eq 1 ]] && return 1
366  root (hd0,0)   if [[ ${retval} -eq 0 ]]
367  setup (hd0)   then
368  quit   case "${mode}" in
369  EOF   "1") run_install_auto ;;
370  exit 0   "2") run_install_normal ;;
371  CHROOTEOF   "") task_setup_system_menu;;
372     esac
373   fi   fi
   
  # run installrc  
  chrooted /bin/bash --rcfile /root/.installrc -i  
  rm ${INSTALLROOT}/root/.installrc  
374  }  }
375    
376  is_initrd_supported()  task_hardware_detection()
377  {  {
378   # only generate initrds if the cmd exists   local message
  [[ -x ${INSTALLROOT}/sbin/mkinitrd ]] && return 0  
  return 1  
 }  
379    
380  install_initrd_chroot()   run_hardware_detection_disks
 {  
  # only generate initrds if the cmd exists  
  is_initrd_supported || return 0  
381    
382   DISKMODS="sd_mod"   message+=$"Harddrives:\n"
  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  
383    
384   if [[ ${FORMFACTOR} = laptop ]]   if [[ ! -z ${ALL_DISKS} ]]
385   then   then
386   OTHERMODS="acpi-cpufreq cpufreq_ondemand cpufreq_conservative cpufreq_powersave"   for i in ${ALL_DISKS}
387     do
388     message+="\Z3${i}\Zn "
389     done
390     message+="\n"
391   fi   fi
392    
393   # install an appropriate uvesafb.conf   if [[ ! -z ${ALL_CDROMS} ]]
394   install -d ${INSTALLROOT}/etc/modprobe.d || dialog_die   then
395   echo "options uvesafb mode_option=1024x768-32@60 scroll=ywrap" > ${INSTALLROOT}/etc/modprobe.d/uvesafb.conf || dialog_die   message+="\n"
396     message+=$"Optical disk drives:\n"
397   # install an appropriate viafb.conf   for i in ${ALL_CDROMS}
398   echo "options viafb viafb_mode=1024x768 viafb_refresh=60" > ${INSTALLROOT}/etc/modprobe.d/viafb.conf || dialog_die   do
399     message+="\Z3${i}\Zn"
400   # install an appropriate i810fb.conf   done
401   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   message+="\n"
402     fi
403    
404   cat > ${INSTALLROOT}/root/.installrc << CHROOTEOF   # other devices
405  echo "MODULES=\"${FORMAT_FILESYSTEM} ${DISKMODS} ${OLDATAMODS} ${PATAMODS} ${SATAMODS} ${DRMMODS} ${FBMODS} ${OTHERMODS}\"" > /etc/conf.d/mkinitrd   run_hardware_detection
406  mkinitrd -f /boot/$(readlink /boot/initrd) $(readlink /boot/vmlinuz | sed "s:kernel-::g") > /dev/null   case "${SPECIALDEVICE}" in
407  exit 0   zotac*) message+=$"\n\Z2Zotac device detected.\Zn" ;;
408  CHROOTEOF   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
414     message+=$"\n\ZnFormfactor Laptop, activating 'ondemand' powersaving mode.\Zn"
415     fi
416    
417   # run installrc   messagebox -y 12 -h $"Detected hardware:" "${message}"
  chrooted /bin/bash --rcfile /root/.installrc -i  
  rm ${INSTALLROOT}/root/.installrc  
418  }  }
419    
420  is_uuid_supported()  task_setup_hdd_partitions_manual()
421  {  {
422   if [[ -x $(type -P busybox.mkinitrd) ]]   local i
423     local retval
424    
425     if [[ -z ${ALL_DISKS} ]]
426   then   then
427   # only detect uuids if supported   dialog_no_harddrive_found
428   if [[ ! -z $(busybox.mkinitrd | grep blkid) ]]   exit 1
429     else
430     HDD=$(dialog_select_target_harddrive)
431     retval=$?
432     [[ ${retval} -eq 1 ]] && return 1
433     if [[ ${retval} -eq 0 ]]
434   then   then
435   return 0   dialog_setup_hdd_info
436     setup_hdd_partitions_manual
437   fi   fi
438   fi   fi
   
  return 1  
439  }  }
440    
441  install_system_settings()  task_setup_hdd_partitions_auto()
442  {  {
443   # schreibe fstab   local i
444   if is_uuid_supported   local retval
  then  
  echo -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLROOT}/etc/fstab || dialog_die  
  else  
  echo -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLROOT}/etc/fstab || dialog_die  
  fi  
  # 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  
   
  # install network config skeleton  
  install -m0644 ${INSTALLROOT}/etc/alxconfig-ng/skel/net/net.eth0 ${INSTALLROOT}/etc/conf.d/ || dialog_die  
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.2438  
changed lines
  Added in v.2487