Magellan Linux

Diff of /alx-src/trunk/alxinstall-ng/bin/alxinstall-ng.sh.in

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

revision 261 by niro, Mon Apr 18 21:28:22 2005 UTC revision 2388 by niro, Wed Jun 15 08:51:38 2011 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  #  #
3  # $Header: /home/cvsd/alx-cvs/alx-src/alxinstall-ng/bin/alxinstall-ng.sh,v 1.3 2005-04-18 21:28:22 niro Exp $  # $Header: /home/cvsd/alx-cvs/alx-src/alxinstall-ng/bin/alxinstall-ng.sh,v 1.15 2008-06-28 00:37:45 niro Exp $
4  #  #
5  # AutoSta_LX Installation Script  # AutoSta_LX Installation Script
 # version: 0.8b  
6  #  #
7  # Niels Rogalla <niro@magellan-linux.de>  # Niels Rogalla <niro@magellan-linux.de>
8  # <rogalla@augusta-bochum.de>  # <rogalla@augusta-bochum.de>
# Line 12  Line 11 
11  # Install Navigation Gui  # Install Navigation Gui
12  #  #
13    
 #source /etc/alx_version  
 #source /opt/alx-config/version  
   
 #source /etc/alx-config/config.rc  
   
14  #images: (get ${CDIMAGENAME})  #images: (get ${CDIMAGENAME})
15  source /mnt/cdrom/system/images.conf  source /mnt/cdrom/system/images.conf
16    
17  #Includes  #Includes
18  source /usr/lib/alxinstall-ng/functions/findhdd.sh > /dev/null  source /usr/lib/alxinstall-ng/functions/findhdd.sh > /dev/null
19  ### bugfix ###############################  ### bugfix ###############################
20  cdromdev="`echo $cdromdev|sed -e 's/ //'`"  cdromdev="$(echo ${cdromdev} | sed 's/ //')"
21  ########################################  ########################################
22    
23  ### System/Config Version  ### System/Config Version
24  VERSION="0.1"  VERSION="0.3.6"
25  TITLE="alxinstall-ng - ${VERSION}"  TITLE="alxinstall-ng - ${VERSION}"
26    
 #CONFIGS_TEMPLATE="/opt/alx-config/configs"  
   
27  CDPATH="/mnt/cdrom"  CDPATH="/mnt/cdrom"
28  INSTALLPATH="/mnt/magellan"  INSTALLPATH="/mnt/magellan"
29    
# Line 39  INSTALLPATH="/mnt/magellan" Line 31  INSTALLPATH="/mnt/magellan"
31  CURRENTLINE=0  CURRENTLINE=0
32  #TOTALLINES=11072 # -> now in images.conf  #TOTALLINES=11072 # -> now in images.conf
33    
34    # standart kernel opts
35    KERNELOPTS="quiet"
36    
37    # default specialdevices
38    SPECIALDEVICE=""
39    
40    # target filesystem
41    FORMAT_FILESYSTEM="ext4"
42    
43  #################################################  #################################################
44  #  DIALOG BOXEN #  #  DIALOG BOXEN #
45  #################################################  #################################################
46    
47  die() {  die()
48   #clear  {
  #echo -e "\nhuch, da ist ein script gestorben -> $?\n"  
  #read  
  #exit 0  
49   ERROR=$1   ERROR=$1
50   RETVAL=$?   RETVAL=$?
51   dialog_install_failure   dialog_install_failure
52   exit 1   exit 1
53  }  }
54    
55  dialog_warning() {  dialog_warning()
56    {
57   dialog \   dialog \
58   --backtitle "$TITLE" \   --backtitle "${TITLE}" \
59   --colors \   --colors \
60   --defaultno \   --defaultno \
61   --yesno "\Z1 !!! Achtung !!! \Zn\n\n\   --yesno "\Z1 !!! Achtung !!! \Zn\n\n\
62   Diese Festplatte wird unwiederruflich geloescht werden.\n\n\   Diese Festplatte wird unwiederruflich geloescht werden.\n\n\
63   Soll ich wirklich fortfahren ?" 10 70   Soll ich wirklich fortfahren ?" 10 70
64   RES=$?   RES=$?
65   if [ "$RES" == "1" ]   if [[ ${RES} -eq 1 ]]
66   then   then
67   clear   clear
68   echo "Der Vorgang wurde abgebrochen."   echo "Der Vorgang wurde abgebrochen."
# Line 72  dialog_warning() { Line 70  dialog_warning() {
70   fi   fi
71  }  }
72    
73  dialog_setup_hdd_info(){  dialog_setup_hdd_info()
74   local SHDD="`echo $HDD|sed -e 's/\/dev\///'`"  {
75     local SHDD="$(echo ${HDD} | sed 's/\/dev\///')"
76    
77   dialog \   dialog \
78   --colors \   --colors \
79   --title "[ Festplatten Partitionierung ]" \   --title "[ Festplatten Partitionierung ]" \
80   --backtitle "$TITLE" \   --backtitle "${TITLE}" \
81   --ok-label "Weiter" \   --ok-label "Weiter" \
82   --msgbox "\nBitte legen Sie 3 Partitionen an.\n\n\   --msgbox "\nBitte legen Sie 3 Partitionen an.\n\n\
83   [ \Z3${SHDD}1\Zn ] Typ: \Z3Linux\Zn mit ca. 50MB\n\   [ \Z3${SHDD}1\Zn ] Typ: \Z3Linux\Zn mit ca. 50MB\n\
# Line 87  dialog_setup_hdd_info(){ Line 86  dialog_setup_hdd_info(){
86   Bitte ${SHDD}1 als \Z3bootable\Zn markieren." 12 81   Bitte ${SHDD}1 als \Z3bootable\Zn markieren." 12 81
87  }  }
88    
89  dialog_setup_hdd_menu() {  dialog_setup_hdd_info_flash()
90    {
91     local SHDD="$(echo $HDD | sed 's/\/dev\///')"
92    
93     dialog \
94     --colors \
95     --title "[ Festplatten Partitionierung ]" \
96     --backtitle "${TITLE}" \
97     --ok-label "Weiter" \
98     --msgbox "\nBitte legen Sie 1 Partition an.\n\n\
99     [ \Z3${SHDD}1\Zn ] Typ: \Z3Linux\Zn mit dem gesamten Speicher\n\
100     Bitte ${SHDD}1 als \Z3bootable\Zn markieren." 12 81
101    }
102    
103    dialog_setup_hdd_info_auto()
104    {
105     local SHDD="$(echo $HDD | sed 's/\/dev\///')"
106    
107   I=`dialog \   dialog \
108   --backtitle "$TITLE" \   --colors \
109     --title "[ Festplatten Partitionierung ]" \
110     --backtitle "${TITLE}" \
111     --ok-label "Weiter" \
112     --msgbox "\nAchtung!\n\
113     Alle Daten werden von der Disk [ \Z3${HDD}\Zn ] gelöscht!" 12 81
114    }
115    
116    dialog_setup_system_menu()
117    {
118     local i
119    
120     i=$(dialog \
121     --backtitle "${TITLE}" \
122   --title "[ Festplatten Partitionierung ]" \   --title "[ Festplatten Partitionierung ]" \
123   --cancel-label "Abbrechen" \   --cancel-label "Abbrechen" \
124   --ok-label "Weiter" \   --ok-label "Weiter" \
125   --stdout \   --stdout \
126   --menu "\nWaehlen Sie zwischen Manuell und Automatisch" 14 70 5 \   --colors \
127   "1" "Manuell" \   --menu "\nWaehlen Sie die Installations-Methode" 14 70 5 \
128   "2" "Automatisch"`   "1" "Automatisches Setup (Empfohlen)" \
129     "" "" \
130     "" "\Z1Experten Modi:\Zn" \
131     "2" "Normale IDE-Disk (Manuell)" \
132     "3" "Flash-Speicher (Manuell)")
133   RES=$?   RES=$?
134   if [ "$RES" == "1" ];then   [[ ${RES} -eq 1 ]] && return 1
135   return 1   if [[ ${RES} -eq 0 ]]
136   fi   then
137   if [ "$RES" == "0" ];then   case "${i}" in
138   case "$I" in   "1") run_install_auto ;;
139           "1")           "2") run_install_normal ;;
140   dialog_setup_hdd_found_manuell   "3") run_install_flash ;;
141   ;;   "") dialog_setup_system_menu;;
  "2")  
  dialog_warning  
  setup_hdd_partitions_silent  
      ;;  
142   esac   esac
143   fi   fi
144  }  }
145    
146  dialog_setup_hdd_found_manuell() {  dialog_hardware_detection()
147   if [ ! -z "$installdevs" ]  {
148     local i
149     local hwtmp
150    
151     if [ -x $(which mktemp &> /dev/null) ]
152   then   then
153   installdevs=""   hwtmp="$(mktemp)"
154     else
155     hwtmp="/tmp/hwtmp.sh"
156   fi   fi
157    
158   echo "dialog \\"  > /tmp/hddtmp.sh   [[ ! -z ${installdevs} ]] && installdevs=""
159   echo "--backtitle \"$TITLE\" \\" >> /tmp/hddtmp.sh  
160   echo "--ok-label \"Weiter\" \\" >> /tmp/hddtmp.sh   echo "dialog \\"  > ${hwtmp}
161   echo "--stdout \\" >> /tmp/hddtmp.sh   echo "--backtitle \"${TITLE}\" \\" >> ${hwtmp}
162   echo "--colors \\" >> /tmp/hddtmp.sh   echo "--ok-label \"Weiter\" \\" >> ${hwtmp}
163   echo "--msgbox \"Gefundene Hardware:\n\n \\" >> /tmp/hddtmp.sh   echo "--stdout \\" >> ${hwtmp}
164   echo " Festplatten:\n \\" >> /tmp/hddtmp.sh   echo "--colors \\" >> ${hwtmp}
165     echo "--msgbox \"Gefundene Hardware:\n\n \\" >> ${hwtmp}
166     echo " Festplatten:\n \\" >> ${hwtmp}
167    
168   if [ ! -z "$scsidisks" ]   if [[ ! -z ${scsidisks} ]]
169   then   then
170   for I in $scsidisks   for i in ${scsidisks}
171   do   do
172   if [ "$I" != "$cdromdev" ]   if [[ ${i} != ${cdromdev} ]]
173   then   then
174   echo " \\Z7SCSI: \\Z3$I\\Zn\n \\" >> /tmp/hddtmp.sh   echo " \\Z7SCSI: \\Z3${i}\\Zn\n \\" >> ${hwtmp}
175   installdevs="$installdevs $I"   installdevs="${installdevs} ${i}"
176   fi   fi
177   done   done
178   fi   fi
179    
180   if [ ! -z "$idedisks" ]   if [[ ! -z ${idedisks} ]]
181   then   then
182   for I in $idedisks   for i in ${idedisks}
183   do   do
184   if [ "$I" != "$cdromdev" ]   if [[ ${i} != ${cdromdev} ]]
185   then   then
186   echo " \\Z7IDE:  \\Z3$I\\Zn\n \\" >> /tmp/hddtmp.sh   echo " \\Z7IDE:  \\Z3${i}\\Zn\n \\" >> ${hwtmp}
187   installdevs="$installdevs $I"   installdevs="${installdevs} ${i}"
188   fi   fi
189   done   done
190   fi   fi
191    
192   if [ ! -z "$cdromdev" ]   if [[ ! -z ${cdromdev} ]]
193   then   then
194   echo " \n \\" >> /tmp/hddtmp.sh   echo " \n \\" >> ${hwtmp}
195   echo " \\Z7andere Laufwerke:\n \\" >> /tmp/hddtmp.sh   echo " \\Z7andere Laufwerke:\n \\" >> ${hwtmp}
196   echo " CDROM: \\Z3$cdromdev\\Zn\n \\" >> /tmp/hddtmp.sh   echo " CDROM: \\Z3${cdromdev}\\Zn\n \\" >> ${hwtmp}
197     fi
198    
199     # other devices
200     run_hardware_detection
201     case "${SPECIALDEVICE}" in
202     zotac) echo " \n\n\n \\Z2Zotac Device erkannt!\\Zn \\" >> ${hwtmp} ;;
203     *) echo " \n\n\n \\ZnStandard Device erkannt!\\Zn \\" >> ${hwtmp} ;;
204     esac
205    
206     echo " \" 13 70" >> ${hwtmp}
207     chmod a+x ${hwtmp}
208     ${hwtmp}
209    
210     # remove tmp file
211     if [[ -f ${hwtmp} ]]
212     then
213     rm ${hwtmp}
214   fi   fi
  echo " \" 13 70" >> /tmp/hddtmp.sh  
  chmod a+x /tmp/hddtmp.sh  
  /tmp/hddtmp.sh  
215  }  }
216    
217  dialog_setup_hdd_partitions_manuell() {  dialog_setup_hdd_partitions_manuell()
218   if [ -z "$installdevs" ]  {
219     local i
220    
221     if [[ -z ${installdevs} ]]
222   then   then
223   dialog \   dialog \
224   --backtitle "$TITLE" \   --backtitle "${TITLE}" \
225   --ok-label "Beenden" \   --ok-label "Beenden" \
226   --msgbox "Kein geeignetes Laufwerk gefunden.\nDie Installation ist fehlgeschlagen." 6 70   --msgbox "Kein geeignetes Laufwerk gefunden.\nDie Installation ist fehlgeschlagen." 6 70
227   exit 1   exit 1
228   else   else
229    
230   echo "dialog \\" > /tmp/hddtmp.sh   echo "dialog \\" > /tmp/hddtmp.sh
231   echo "--backtitle \"$TITLE\" \\" >> /tmp/hddtmp.sh   echo "--backtitle \"${TITLE}\" \\" >> /tmp/hddtmp.sh
232   echo "--ok-label \"Weiter\" \\" >> /tmp/hddtmp.sh   echo "--ok-label \"Weiter\" \\" >> /tmp/hddtmp.sh
233   echo "--cancel-label \"Beenden\" \\" >> /tmp/hddtmp.sh   echo "--cancel-label \"Beenden\" \\" >> /tmp/hddtmp.sh
234   echo "--stdout \\" >> /tmp/hddtmp.sh   echo "--stdout \\" >> /tmp/hddtmp.sh
235   echo "--menu \"Installations Laufwerk auswaehlen:\" 10 70 3 \\" >> /tmp/hddtmp.sh   echo "--menu \"Installations Laufwerk auswaehlen:\" 10 70 3 \\" >> /tmp/hddtmp.sh
236    
237   for I in $installdevs   for i in ${installdevs}
238   do   do
239   echo "\"$I\" \"\" \\" >> /tmp/hddtmp.sh   echo "\"${i}\" \"\" \\" >> /tmp/hddtmp.sh
240   done   done
241   echo -e "\n" >> /tmp/hddtmp.sh   echo -e "\n" >> /tmp/hddtmp.sh
242    
243   chmod a+x /tmp/hddtmp.sh   chmod a+x /tmp/hddtmp.sh
244   HDD="`/tmp/hddtmp.sh`"   HDD="$(/tmp/hddtmp.sh)"
245   RES=$?   RES=$?
246   if [ "$RES" == "1" ]   [[ ${RES} -eq 1 ]] && return 1
247   then   if [[ ${RES} -eq 0 ]]
  return 1  
  fi  
  if [ "$RES" == "0" ]  
248   then   then
249   dialog_setup_hdd_info   dialog_setup_hdd_info
250   setup_hdd_partitions_manuell   setup_hdd_partitions_manuell
# Line 202  dialog_setup_hdd_partitions_manuell() { Line 252  dialog_setup_hdd_partitions_manuell() {
252   fi   fi
253  }  }
254    
255  dialog_setup_hdd_partitions_silent() {  dialog_setup_hdd_partitions_manuell_flash()
256    {
257     local i
258    
259     if [[ -z ${installdevs} ]]
260     then
261     dialog \
262     --backtitle "${TITLE}" \
263     --ok-label "Beenden" \
264     --msgbox "Kein geeignetes Laufwerk gefunden.\nDie Installation ist fehlgeschlagen." 6 70
265     exit 1
266     else
267    
268     echo "dialog \\" > /tmp/hddtmp.sh
269     echo "--backtitle \"${TITLE}\" \\" >> /tmp/hddtmp.sh
270     echo "--ok-label \"Weiter\" \\" >> /tmp/hddtmp.sh
271     echo "--cancel-label \"Beenden\" \\" >> /tmp/hddtmp.sh
272     echo "--stdout \\" >> /tmp/hddtmp.sh
273     echo "--menu \"Installations Laufwerk auswaehlen:\" 10 70 3 \\" >> /tmp/hddtmp.sh
274    
275     for i in ${installdevs}
276     do
277     echo "\"${i}\" \"\" \\" >> /tmp/hddtmp.sh
278     done
279     echo -e "\n" >> /tmp/hddtmp.sh
280    
281     chmod a+x /tmp/hddtmp.sh
282     HDD="$(/tmp/hddtmp.sh)"
283     RES=$?
284     [[ ${RES} -eq 1 ]] && return 1
285     if [[ ${RES} -eq 0 ]]
286     then
287     dialog_setup_hdd_info_flash
288     setup_hdd_partitions_manuell_flash
289     fi
290     fi
291    }
292    
293    dialog_setup_hdd_partitions_auto()
294    {
295     local i
296    
297     if [[ -z ${installdevs} ]]
298     then
299     dialog \
300     --backtitle "${TITLE}" \
301     --ok-label "Beenden" \
302     --msgbox "Kein geeignetes Laufwerk gefunden.\nDie Installation ist fehlgeschlagen." 6 70
303     exit 1
304     else
305    
306     echo "dialog \\" > /tmp/hddtmp.sh
307     echo "--backtitle \"${TITLE}\" \\" >> /tmp/hddtmp.sh
308     echo "--ok-label \"Weiter\" \\" >> /tmp/hddtmp.sh
309     echo "--cancel-label \"Beenden\" \\" >> /tmp/hddtmp.sh
310     echo "--stdout \\" >> /tmp/hddtmp.sh
311     echo "--menu \"Installations Laufwerk auswaehlen:\" 10 70 3 \\" >> /tmp/hddtmp.sh
312    
313     for i in ${installdevs}
314     do
315     echo "\"${i}\" \"\" \\" >> /tmp/hddtmp.sh
316     done
317     echo -e "\n" >> /tmp/hddtmp.sh
318    
319     chmod a+x /tmp/hddtmp.sh
320     HDD="$(/tmp/hddtmp.sh)"
321     RES=$?
322     [[ ${RES} -eq 1 ]] && return 1
323     if [[ ${RES} -eq 0 ]]
324     then
325     dialog_setup_hdd_info_auto
326     dialog_setup_hdd_create_partitions
327     setup_hdd_partitions_auto
328     fi
329     fi
330    }
331    
332    dialog_setup_hdd_create_partitions()
333    {
334   dialog \   dialog \
335   --backtitle "$TITLE" \   --backtitle "${TITLE}" \
336   --infobox "Erstelle Partitionen ..." 3 70   --infobox "Erstelle Disk Partitionen ..." 3 70
337  }  }
338    
339  dialog_setup_hdd_format() {  dialog_setup_hdd_format()
340    {
341   dialog \   dialog \
342   --backtitle "$TITLE" \   --backtitle "${TITLE}" \
343   --infobox "Erstelle Datei-Systeme ..." 3 70   --infobox "Erstelle Datei-Systeme ..." 3 70
344  }  }
345    
346  dialog_install_settings() {  dialog_install_settings()
347    {
348   dialog \   dialog \
349   --backtitle "$TITLE" \   --backtitle "${TITLE}" \
350   --infobox "Speichere System-Einstellungen ..." 3 70   --infobox "Speichere System-Einstellungen ..." 3 70
351  }  }
352    
353  dialog_install_system_image() {  dialog_install_system_image()
354    {
355   dialog \   dialog \
356   --backtitle "$TITLE" \   --backtitle "${TITLE}" \
357   --gauge "Kopiere System-Image ..." 6 80   --gauge "Kopiere System-Image ..." 6 80
358  }  }
359    
360  dialog_install_meter() {  dialog_install_meter()
361   while [ "${CURRENTLINE}" != "${TOTALLINES}" ] ; do  {
362   CURRENTLINE=`grep --count . /tmp/install.log`   while [[ ${CURRENTLINE} != ${TOTALLINES} ]]
363   PERCENT=`expr ${CURRENTLINE} \* 100 / ${TOTALLINES}`   do
364     CURRENTLINE=$(grep -c . /tmp/install.log)
365     PERCENT=$(( ${CURRENTLINE} * 100 / ${TOTALLINES}))
366   echo ${PERCENT}   echo ${PERCENT}
367   sleep 1   sleep 1
368   done   done
# Line 238  dialog_install_meter() { Line 371  dialog_install_meter() {
371  }  }
372    
373    
374  dialog_install_bootsector() {  dialog_install_bootsector()
375    {
376   dialog \   dialog \
377   --backtitle "$TITLE" \   --backtitle "${TITLE}" \
378   --infobox "Schreibe den Bootsektor ..." 3 70   --infobox "Schreibe den Bootsektor ..." 3 70
379  }  }
380    
381  dialog_install_alxconfig() {  dialog_install_successful()
382   dialog \  {
  --backtitle "$TITLE" \  
  --infobox "Installiere die ALX Setup-Tools ..." 3 70  
 }  
   
 dialog_install_kernel_image() {  
383   dialog \   dialog \
384   --backtitle "$TITLE" \   --backtitle "${TITLE}" \
  --infobox "Installiere den System-Kernel ..." 3 70  
   
 }  
   
 dialog_install_hotfixes() {  
  dialog \  
  --backtitle "$TITLE" \  
  --infobox "Installiere Hotfixes ..." 3 70  
   
 }  
   
 dialog_install_successful() {  
  dialog \  
  --backtitle "$TITLE" \  
385   --colors \   --colors \
386   --msgbox "Die Installation war \Z2erfolgreich\Zn." 5 81   --msgbox "Die Installation war \Z2erfolgreich\Zn." 5 81
387  }  }
388    
389  dialog_install_failure() {  dialog_install_failure()
390    {
391   dialog \   dialog \
392   --backtitle "$TITLE" \   --backtitle "${TITLE}" \
393   --colors \   --colors \
394   --msgbox "Die Installation ist \Z1Fehlgeschlagen\Zn.\n\n\   --msgbox "Die Installation ist \Z1Fehlgeschlagen\Zn.\n\n\
395   Fehler bei $ERROR, RetVal: $RETVAL \   Fehler bei ${ERROR}, RetVal: ${RETVAL} \
396   " 10 81   " 10 81
397  }  }
398    
399  dialog_install_method() {  dialog_main()
400    {
  METHOD=`dialog \  
  --backtitle "$TITLE" \  
  --cancel-label "Abbrechen" \  
  --ok-label "Weiter" \  
  --stdout \  
  --menu "Konfiguration" 14 70 5 \  
  "1" "Normale Installation" \  
  "2" "Silent Installation"`  
  RES=$?  
  if [ "$RES" == "1" ];then  
  return 1  
  fi  
  if [ "$RES" == "0" ];then  
  case "$METHOD" in  
          "1")  
  run_install_normal  
  ;;  
  "2")  
  dialog_warning  
  run_install_silent  
      ;;  
  esac  
  fi  
 }  
   
 dialog_main() {  
401   METHOD=0   METHOD=0
402    
403   while [ $METHOD -le 2 ]   while [[ ${METHOD} -le 2 ]]
404   do   do
405   METHOD=`dialog \   METHOD=$(dialog \
406   --backtitle "$TITLE" \   --backtitle "${TITLE}" \
407   --no-cancel \   --no-cancel \
408   --ok-label "Weiter" \   --ok-label "Weiter" \
409   --stdout \   --stdout \
# Line 321  dialog_main() { Line 411  dialog_main() {
411   "1" "AutoSta_LX installieren" \   "1" "AutoSta_LX installieren" \
412   "2" "Uebersicht gefundener Laufwerke" \   "2" "Uebersicht gefundener Laufwerke" \
413   "3" "Beenden und neustarten" \   "3" "Beenden und neustarten" \
414   "4" "Beenden und eine Shell starten" `   "4" "Beenden und eine Shell starten")
415   RES=$?   RES=$?
416   if [ "$RES" == "1" ];then   [[ ${RES} -eq 1 ]] && exit 1
417   exit 1   if [[ ${RES} -eq 0 ]]
418   fi   then
419   if [ "$RES" == "0" ];then   case ${METHOD} in
420   case "$METHOD" in           "1") dialog_setup_system_menu ;;
421           "1")   "2") dialog_hardware_detection ;;
422   #only for now later it will be used again   "3") install_do_reboot ;;
423   #with 6.1-r2 only one install method available   "4") /bin/bash --login -i ;;
  #dialog_install_method  
  run_install_normal  
  ;;  
  "2") dialog_setup_hdd_found_manuell  
  ;;  
  "3") install_do_reboot  
  ;;  
  "4") /bin/bash --login -i  
  ;;  
424   esac   esac
425   fi   fi
426   done   done
# Line 348  dialog_main() { Line 429  dialog_main() {
429  #################################################  #################################################
430  # Install Komandos #  # Install Komandos #
431  #################################################  #################################################
432  setup_hdd_partitions_manuell() {  run_hardware_detection()
433    {
434     # check for special devices/clients:
435     # if zotac a zotac and the disk is a removeable device, then add rootdelay to kernelcmd
436     local removable=0
437     if [[ ! -z $(hwinfo --bios --storage | grep -i zotac) ]]
438     then
439     for i in /sys/block/[hs]d*/removable
440     do
441     if [[ $(< ${i}) = 1 ]]
442     then
443     removable=1
444     fi
445     done
446    
447     export KERNELOPTS="${KERNELOPTS} rootdelay=8"
448     export SPECIALDEVICE="zotac"
449     fi
450    }
451    
452    setup_hdd_partitions_auto()
453    {
454     ROOTHDD="${HDD}1"
455    
456     ## delete disk
457     dd if=/dev/zero of=${HDD} count=1 &> /dev/null || die
458    
459     ## setup one bootable partition
460     #1. n= new disk
461     #2. p= primary disk
462     #3. 1= first partition
463     #4. ''= default sector start
464     #5. ''= defaul sector end
465     #6. a= bootable flag
466     #7. 1= boot flag for partition 1
467     #8. w= write/quit
468     fdisk ${HDD} &> /dev/null << EOF
469    n
470    p
471    1
472    
473    
474    a
475    1
476    w
477    EOF
478    }
479    
480    setup_hdd_partitions_manuell()
481    {
482   BOOTHDD="${HDD}1"   BOOTHDD="${HDD}1"
483   SWAPHDD="${HDD}2"   SWAPHDD="${HDD}2"
484   ROOTHDD="${HDD}3"   ROOTHDD="${HDD}3"
485    
486   ## hdds partitionieren manuell   ## hdds partitionieren manuell
487   cfdisk $HDD || die   cfdisk ${HDD} || die
488  }  }
489    
490  setup_hdd_partitions_silent() {  setup_hdd_partitions_manuell_flash()
491   ## hdds löschen  {
492   dd if=/dev/zero of=$HDD bs=1024k count=1 || die   ROOTHDD="${HDD}1"
  ## hdds partitionieren silent  
  fdisk $HDD < $CONFIGS_TEMPLATE/fdisksettings #1> /dev/null 3> /dev/null || die  
   
  read  
 }  
493    
494  setup_hdd_format() {   ## hdds partitionieren manuell
495   mkswap $SWAPHDD || die   cfdisk ${HDD} || die
  mke2fs -j -q $BOOTHDD || die  
  mke2fs -j -q $ROOTHDD || die  
496  }  }
497    
498  install_mount_rootfs() {  setup_hdd_format()
499   swapon $SWAPHDD || die  {
500   mount $ROOTHDD $INSTALLPATH || die   mkswap ${SWAPHDD} || die
501   install -d $INSTALLPATH/boot || die   mke2fs -j -q ${BOOTHDD} || die
502   mount $BOOTHDD $INSTALLPATH/boot || die   mke2fs -j -q ${ROOTHDD} || die
  cd $INSTALLPATH || die  
503  }  }
504    
505  install_system_image() {  setup_hdd_format_flash()
506   #tar xvzpf $CDPATH/system/autosta_lx.tar.gz  {
507   tar xvjpf ${CDPATH}/system/${CDIMAGENAME} -C ${INSTALLPATH}   mke2fs -j -q ${ROOTHDD} || die
508  }  }
509    
510    install_mount_rootfs()
511  install_kernel_image() {  {
512   declare -i CPUTYPE=`cat /proc/cpuinfo |grep "cpu family"|cut -d ' ' -f3`   swapon ${SWAPHDD} || die
513     mount ${ROOTHDD} ${INSTALLPATH} || die
514   if [ $CPUTYPE -le 5 ];then   install -d ${INSTALLPATH}/boot || die
515                  #echo -e "\033[1;6m\033[36m""i386 Architektur gefunden.""\033[0m"   mount ${BOOTHDD} ${INSTALLPATH}/boot || die
516                  #echo -e "Installiere i386 Kernel..."   cd ${INSTALLPATH} || die
   
  lastdir="`pwd`"  
   
  mkdir -p $INSTALLPATH/INSTALL/kernel || die  
  cd $INSTALLPATH/INSTALL/kernel || die  
  tar xzpf $CDPATH/kernels/kernel-i386.tar.gz || die  
  source $INSTALLPATH/INSTALL/kernel/kernelversion || die  
   
  cp -aRf $INSTALLPATH/INSTALL/kernel/$KRNLIB $INSTALLPATH/lib/modules || die  
  cp -aRf $INSTALLPATH/INSTALL/kernel/$KRNIMG $INSTALLPATH/boot || die  
  cp -aRf $INSTALLPATH/INSTALL/kernel/$KRNINITRD $INSTALLPATH/boot || die  
  cp -aRf $INSTALLPATH/INSTALL/kernel/kernelversion $INSTALLPATH/boot || die  
   
  cd $lastdir || die  
   
         elif [ $CPUTYPE -ge 6 ];then  
                 #echo -e "\033[1;6m\033[36m""i686 Architektur gefunden.""\033[0m"  
                 #echo -e "Installiere i686 Kernel..."  
   
  lastdir="`pwd`"  
   
  mkdir -p $INSTALLPATH/INSTALL/kernel || die  
  cd $INSTALLPATH/INSTALL/kernel || die  
  tar xzpf $CDPATH/kernels/kernel-i686.tar.gz || die  
  source $INSTALLPATH/INSTALL/kernel/kernelversion || die  
   
  cp -aRf $INSTALLPATH/INSTALL/kernel/$KRNLIB $INSTALLPATH/lib/modules || die  
  cp -aRf $INSTALLPATH/INSTALL/kernel/$KRNIMG $INSTALLPATH/boot || die  
  cp -aRf $INSTALLPATH/INSTALL/kernel/$KRNINITRD $INSTALLPATH/boot || die  
  cp -aRf $INSTALLPATH/INSTALL/kernel/kernelversion $INSTALLPATH/boot || die  
   
  cd $lastdir || die  
         fi  
517  }  }
518    
519  install_bootsector() {  install_mount_rootfs_flash()
520   ### grubconf schreiben  {
521   source $INSTALLPATH/INSTALL/kernel/kernelversion   mount ${ROOTHDD} ${INSTALLPATH} || die
522     install -d ${INSTALLPATH}/boot || die
523   if [ -z $KRNVER ]   cd ${INSTALLPATH} || die
524   then  }
  KRNVER="AutoSta_LX"  
  fi  
   
  if [ -z $KRNIMG ]  
  then  
  KRNIMG="bzImage"  
  fi  
   
  if [ -z $KRNINITRD ]  
  then  
  KRNINITRD="initrd"  
  fi  
   
  echo -e "default 0" > $INSTALLPATH/boot/grub/grub.conf || die  
  echo -e "timeout 03" >> $INSTALLPATH/boot/grub/grub.conf ||die  
  #no support for splash image in 6.1-r2  
  #echo -e "splashimage=(hd0,0)/boot/grub/splash.xpm.gz" >> $INSTALLPATH/boot/grub/grub.conf || die  
  echo -e "\ntitle=${KRNVER}" >> $INSTALLPATH/boot/grub/grub.conf || die  
  echo -e "root (hd0,0)" >> $INSTALLPATH/boot/grub/grub.conf || die  
   
  #s3 cards don't support this  
  #echo -e "kernel (hd0,0)/boot/${KRNIMG} root=$ROOTHDD vga=0x317 video:vesa:ywrap,mtrr splash=silent quiet" >> $INSTALLPATH/boot/grub/grub.conf || die  
  #that's more safer:  
  echo -e "kernel (hd0,0)/boot/${KRNIMG} root=$ROOTHDD quiet" >> $INSTALLPATH/boot/grub/grub.conf || die  
   
  #not needed without bootsplash support  
  #echo -e "initrd=/boot/${KRNINITRD}" >> $INSTALLPATH/boot/grub/grub.conf || die  
525    
526   ### bootsector schreiben  install_system_image()
527   #grub --no-floppy < $CONFIGS_TEMPLATE/grubsettings || die  {
528   /sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null || die   tar xvjpf ${CDPATH}/system/${CDIMAGENAME} -C ${INSTALLPATH}
 root (hd0,0)  
 setup (hd0)  
 quit  
 EOF  
529  }  }
530    
531  install_bootsector_chroot() {  install_bootsector_chroot()
532    {
533     local my_roothdd
534    
535   ### grubconf schreiben   ### grubconf schreiben
536   #source $INSTALLPATH/INSTALL/kernel/kernelversion   source ${INSTALLPATH}/boot/kernelversion
  source $INSTALLPATH/boot/kernelversion  
537    
538   #for alx only   #for alx only
539   if [ -e ${INSTALLPATH}/etc/alx_version ]   if [ -e ${INSTALLPATH}/etc/alx_version ]
# Line 483  install_bootsector_chroot() { Line 543  install_bootsector_chroot() {
543   KRNVER="ALX-${ALXVER}"   KRNVER="ALX-${ALXVER}"
544   ALXVER="${OLD_ALXVER}"   ALXVER="${OLD_ALXVER}"
545   fi   fi
546    
547   if [ -z "$KRNVER" ]   [[ -z ${KRNVER} ]] && KRNVER="AutoSta_LX"
548     [[ -z ${KRNINITRD} ]] && KRNINITRD="initrd"
549     [[ -z ${KRNIMG} ]] && KRNIMG="vmlinuz"
550    
551     # uuid support
552     if is_uuid_supported
553   then   then
554   KRNVER="AutoSta_LX"   my_roothdd="UUID=$(get_uuid ${ROOTHDD})"
555     else
556     my_roothdd="${ROOTHDD}"
557   fi   fi
558    
559   if [ -z "$KRNIMG" ]   local grubconf=${INSTALLPATH}/boot/grub/grub.conf
560     : > ${grubconf} || die
561     echo "default 0" >> ${grubconf} || die
562     echo "timeout 3" >> ${grubconf} || die
563     # using current root password
564     echo "password --md5 $(cat ${INSTALLPATH}/etc/shadow | grep root | cut -d: -f2)"  >> ${grubconf} || die
565    
566     echo  >> ${grubconf} || die
567     echo "# normal boot" >> ${grubconf} || die
568     echo "title ${KRNVER}" >> ${grubconf} || die
569     echo "root (hd0,0)" >> ${grubconf} || die
570     echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS}" >> ${grubconf} || die
571     if is_initrd_supported
572   then   then
573   KRNIMG="bzImage"   echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die
574   fi   fi
575    
576   if [ -z "$KRNINITRD" ]   echo >> ${grubconf} || die
577     echo "# admin boot" >> ${grubconf} || die
578     echo "title ${KRNVER} - Re-run hardware-detection" >> ${grubconf} || die
579     echo "lock"  >> ${grubconf} || die
580     echo "root (hd0,0)" >> ${grubconf} || die
581     echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS} hardware-auto-detection" >> ${grubconf} || die
582     if is_initrd_supported
583   then   then
584   KRNINITRD="initrd"   echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die
585   fi   fi
586    
587   echo -e "default 0" > $INSTALLPATH/boot/grub/grub.conf || die   echo >> ${grubconf} || die
588   echo -e "timeout 03" >> $INSTALLPATH/boot/grub/grub.conf ||die   echo "title ${KRNVER} - Reset *all* local settings" >> ${grubconf} || die
589     echo "lock"  >> ${grubconf} || die
590   #no support for splash image in 6.1-r2   echo "root (hd0,0)" >> ${grubconf} || die
591   #echo -e "splashimage=(hd0,0)/boot/grub/splash.xpm.gz" >> $INSTALLPATH/boot/grub/grub.conf || die   echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS} alx-reset-settings" >> ${grubconf} || die
592     if is_initrd_supported
  echo -e "\ntitle=${KRNVER}" >> $INSTALLPATH/boot/grub/grub.conf || die  
  echo -e "root (hd0,0)" >> $INSTALLPATH/boot/grub/grub.conf || die  
   
  #s3 cards don't support this  
  #echo -e "kernel (hd0,0)/boot/${KRNIMG} root=$ROOTHDD vga=0x317 video:vesa:ywrap,mtrr splash=silent quiet" >> $INSTALLPATH/boot/grub/grub.conf || die  
  #that's more safer:  
  echo -e "kernel (hd0,0)/boot/${KRNIMG} root=$ROOTHDD quiet" >> $INSTALLPATH/boot/grub/grub.conf || die  
   
  #not needed without bootsplash support  
  #echo -e "initrd=/boot/${KRNINITRD}" >> $INSTALLPATH/boot/grub/grub.conf || die  
   
   
  ### bootsector schreiben chrooted schreiben (gentoo)  
  if [ -f $INSTALLPATH/sbin/grub ]  
593   then   then
594   cat > $INSTALLPATH/root/.bashrc << CHROOTEOF   echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die
 /sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null  
 root (hd0,0)  
 setup (hd0)  
 quit  
 EOF  
 exit 0  
 CHROOTEOF  
595   fi   fi
596    
597   ### bootsector schreiben chrooted schreiben (lfs/magellan)   # bootsector schreiben chrooted schreiben (lfs/magellan)
598   if [ -f $INSTALLPATH/usr/sbin/grub ]   cat > ${INSTALLPATH}/root/.bashrc << CHROOTEOF
  then  
  cat > $INSTALLPATH/root/.bashrc << CHROOTEOF  
599  /usr/sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null  /usr/sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null
600  root (hd0,0)  root (hd0,0)
601  setup (hd0)  setup (hd0)
# Line 541  quit Line 603  quit
603  EOF  EOF
604  exit 0  exit 0
605  CHROOTEOF  CHROOTEOF
606    
607     ## enters chroot
608     mount -t proc proc ${INSTALLPATH}/proc
609     mount -t sysfs sysfs ${INSTALLPATH}/sys
610     mount -o bind /dev ${INSTALLPATH}/dev
611     chroot ${INSTALLPATH} /bin/bash --rcfile /root/.bashrc -i
612     umount ${INSTALLPATH}/proc
613     umount ${INSTALLPATH}/sys
614     umount ${INSTALLPATH}/dev
615     rm ${INSTALLPATH}/root/.bashrc
616    }
617    
618    is_initrd_supported()
619    {
620     # only generate initrds if the cmd exists
621     [[ -x ${INSTALLPATH}/sbin/mkinitrd ]] && return 0
622     return 1
623    }
624    
625    install_initrd_chroot()
626    {
627     # only generate initrds if the cmd exists
628     is_initrd_supported || return 0
629    
630     cat > ${INSTALLPATH}/root/.bashrc << CHROOTEOF
631    echo "MODULES=\"${FORMAT_FILESYSTEM} amd74xx piix sis5513 via82cxxx sd_mod ata_piix pata_amd pata_mpiix pata_oldpiix pata_sis pata_via sata_via sata_sis sata_nv\"" > /etc/conf.d/mkinitrd
632    mkinitrd -f /boot/$(readlink /boot/initrd) $(readlink /boot/vmlinuz | sed "s:kernel-::g") > /dev/null
633    exit 0
634    CHROOTEOF
635    
636     ## enters chroot
637     mount -t proc proc ${INSTALLPATH}/proc
638     mount -t sysfs sysfs ${INSTALLPATH}/sys
639     mount -o bind /dev ${INSTALLPATH}/dev
640     chroot ${INSTALLPATH} /bin/bash --rcfile /root/.bashrc -i
641     umount ${INSTALLPATH}/proc
642     umount ${INSTALLPATH}/sys
643     umount ${INSTALLPATH}/dev
644     rm ${INSTALLPATH}/root/.bashrc
645    }
646    
647    is_uuid_supported()
648    {
649     if [[ -x $(which busybox.mkinitrd &> /dev/null) ]]
650     then
651     # only detect uuids if supported
652     if [[ ! -z $(busybox.mkinitrd | grep blkid) ]]
653     then
654     return 0
655     fi
656   fi   fi
657    
658   ##enters chroot   return 1
  mount -t proc none $INSTALLPATH/proc  
  # bind /dev to get the devices right,  
  # if bootet from a 2.6 kernel with udev  
  mount -o bind /dev $INSTALLPATH/dev  
  chroot $INSTALLPATH /bin/bash --rcfile /root/.bashrc -i  
  umount $INSTALLPATH/proc  
  umount $INSTALLPATH/dev  
  rm $INSTALLPATH/root/.bashrc  
659  }  }
660    
661  install_alxconfig(){  get_uuid()
662   lastdir="`pwd`"  {
663     local UUID
664     local SEC_TYPE
665     local TYPE
666    
667   mkdir -p $INSTALLPATH/opt/alx-config || die   local dev="$1"
668   cd $INSTALLPATH/opt/alx-config || die   [[ -z ${dev} ]] && die "no dev given"
  tar xzpf $CDPATH/alx-config/alx-config.tar.gz || die  
  chmod a+x $INSTALLPATH/opt/alx-config/Configurator/config_functions.sh || die  
  chmod a+x $INSTALLPATH/opt/alx-config/Configurator/config_menu.sh || die  
  ln -sf /opt/alx-config/Configurator/config_menu.sh $INSTALLPATH/bin/ALXConfig || die  
669    
670   cd $lastdir || die   # check if given device is already an UUID
671     if [[ ${dev/UUID=/}x != ${dev}x ]]
672     then
673     eval "${dev}"
674     else
675     eval $(busybox.mkinitrd blkid ${dev} | grep "${dev}:" | sed 's/.*:\ //')
676     fi
677     echo "${UUID}"
678  }  }
679    
680    install_system_settings()
681    {
682     # schreibe fstab
683     if is_uuid_supported
684     then
685     echo -e "UUID=$(get_uuid ${BOOTHDD})\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALLPATH}/etc/fstab || die
686     echo -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLPATH}/etc/fstab || die
687     else
688     echo -e "${BOOTHDD}\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALLPATH}/etc/fstab || die
689     echo -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLPATH}/etc/fstab || die
690     fi
691     # not needed busybox loads all with swapon -a, even if not mentioned in fstab
692     #echo -e "UUID='$(get_uuid ${SWAPHDD})'\tswap\tswap\tpri=1\t0 0" >> ${INSTALLPATH}/etc/fstab || die
693     echo -e "proc\t/proc\tproc\tdefaults\t0 0" >> ${INSTALLPATH}/etc/fstab || die
694     echo -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0" >> ${INSTALLPATH}/etc/fstab || die
695    
696  install_system_settings(){   # install network config skeleton
697   ### schreibe fstab   install -m0644 ${INSTALLPATH}/etc/alxconfig-ng/skel/net/net.eth0 ${INSTALLPATH}/etc/conf.d/ || die
  echo -e "$BOOTHDD\t/\text3\tnoatime,noauto\t1 1" > $INSTALLPATH/etc/fstab || die  
  echo -e "$ROOTHDD\t/\text3\tnoatime\t0 0" >> $INSTALLPATH/etc/fstab || die  
  echo -e "$SWAPHDD\tswap\tswap\tpri=1\t0 0" >> $INSTALLPATH/etc/fstab || die  
  echo -e "none\t/proc\tproc\tdefaults\t0 0" >> $INSTALLPATH/etc/fstab || die  
   
  #deprecated  
  #echo -e "devpts\t/dev/pts\tdevpts\tgid=4,mode=620\t0 0" >> $INSTALLPATH/etc/fstab || die  
   
  echo -e "none\t/dev/shm\ttmpfs\tdefaults\t0 0" >> $INSTALLPATH/etc/fstab || die  
  echo -e "none\t/proc/bus/usb\tusbfs\tdefaults\t0 0" >> $INSTALLPATH/etc/fstab || die  
698  }  }
699    
700  install_hotfixes(){  install_system_settings_flash()
701   if [ -f $CDPATH/hotfixes/hotfixes.sh ]  {
702     # schreibe fstab
703     if is_uuid_supported
704   then   then
705   dialog_hotfixes   echo -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" > ${INSTALLPATH}/etc/fstab || die
706   sleep1   else
707   $CDPATH/hotfixes/hotfixes.sh   echo -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" > ${INSTALLPATH}/etc/fstab || die
708   fi   fi
709     echo -e "proc\t/proc\tproc\tdefaults\t0 0" >> ${INSTALLPATH}/etc/fstab || die
710     echo -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0" >> ${INSTALLPATH}/etc/fstab || die
711    }
712    
713    install_umount_rootfs()
714    {
715     cd /
716     umount ${INSTALLPATH}/boot || die
717     umount ${INSTALLPATH} || die
718     swapoff ${SWAPHDD} || die
719  }  }
720    
721  install_umount_rootfs() {  install_umount_rootfs_flash()
722    {
723   cd /   cd /
724   umount $INSTALLPATH/boot || die   umount ${INSTALLPATH} || die
  umount $INSTALLPATH || die  
  swapoff $SWAPHDD || die  
725  }  }
726    
727  install_do_reboot() {  install_do_reboot()
728    {
  #only for now later it will be used again  
  #with 6.1-r2 these options are not available  
  #cd /  
  #umount $CDPATH  
  #eject  
  #clear  
   
729   reboot   reboot
730  }  }
731    
# Line 614  install_do_reboot() { Line 733  install_do_reboot() {
733  #     Install Ablauf Scripte #  #     Install Ablauf Scripte #
734  #################################################  #################################################
735    
736  run_install_normal() {  run_install_normal()
737   #only for now later it will be used again  {
738   #with 6.1-r2 only one install method available   dialog_hardware_detection
739   #dialog_setup_hdd_menu  
  dialog_setup_hdd_found_manuell  
   
740   dialog_setup_hdd_partitions_manuell   dialog_setup_hdd_partitions_manuell
741   dialog_setup_hdd_format   dialog_setup_hdd_format
742   setup_hdd_format > /dev/null   setup_hdd_format > /dev/null
743   install_mount_rootfs   install_mount_rootfs
744   (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | dialog_install_meter | dialog_install_system_image   (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | dialog_install_meter | dialog_install_system_image
745    
  #only for now later it will be used again  
  #with 6.1-r2 variable kernels are not available  
  #dialog_install_kernel_image  
  #install_kernel_image  
   
746   dialog_install_bootsector   dialog_install_bootsector
747   install_bootsector_chroot   install_bootsector_chroot
748    
  #only for now later it will be used again  
  #with 6.1-r2 highest version of alx-config is already included  
  #dialog_install_alxconfig  
  #sleep 1  
  #install_alxconfig  
   
749   dialog_install_settings   dialog_install_settings
750   sleep 1   sleep 1
751   install_system_settings   install_system_settings
752   install_hotfixes   install_initrd_chroot
753   install_umount_rootfs   install_umount_rootfs
754   dialog_install_successful   dialog_install_successful
755  }  }
756    
757  run_install_silent() {  run_install_flash()
758   echo "starting silent install ..."  {
759     dialog_hardware_detection
760    
761     dialog_setup_hdd_partitions_manuell_flash
762     dialog_setup_hdd_format
763     setup_hdd_format_flash > /dev/null
764     install_mount_rootfs_flash
765     (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | dialog_install_meter | dialog_install_system_image
766    
767     dialog_install_bootsector
768     install_bootsector_chroot
769    
770     dialog_install_settings
771   sleep 1   sleep 1
772     install_system_settings_flash
773     install_initrd_chroot
774     install_umount_rootfs_flash
775     dialog_install_successful
776  }  }
777    
778  run_install_unattended() {  run_install_auto()
779   echo "starting unattended install ..."  {
780     dialog_hardware_detection
781    
782     dialog_setup_hdd_partitions_auto
783     dialog_setup_hdd_format
784     setup_hdd_format_flash > /dev/null
785     install_mount_rootfs_flash
786     (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | dialog_install_meter | dialog_install_system_image
787    
788     dialog_install_bootsector
789     install_bootsector_chroot
790    
791     dialog_install_settings
792   sleep 1   sleep 1
793     install_system_settings_flash
794     install_initrd_chroot
795     install_umount_rootfs_flash
796     dialog_install_successful
797  }  }
798    
799  if [ "$1" == "unattended" ]  dialog_main
 then  
  run_install_unattended  
 else  
  dialog_main  
 fi  
800    
801  exit 0  exit 0

Legend:
Removed from v.261  
changed lines
  Added in v.2388