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

alx-src/trunk/alxinstall-ng/bin/alxinstall-ng.sh revision 259 by niro, Mon Apr 18 19:01:41 2005 UTC alx-src/trunk/alxinstall-ng/bin/alxinstall-ng.sh.in revision 2554 by niro, Mon Jul 4 18:06:45 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.1.1.1 2005-04-18 19:01:41 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="%VERSIONTAG%"
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     dialog \
108     --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 \   i=$(dialog \
121   --backtitle "$TITLE" \   --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=""
  echo "--backtitle \"$TITLE\" \\" >> /tmp/hddtmp.sh  
  echo "--ok-label \"Weiter\" \\" >> /tmp/hddtmp.sh  
  echo "--stdout \\" >> /tmp/hddtmp.sh  
  echo "--colors \\" >> /tmp/hddtmp.sh  
  echo "--msgbox \"Gefundene Hardware:\n\n \\" >> /tmp/hddtmp.sh  
  echo " Festplatten:\n \\" >> /tmp/hddtmp.sh  
159    
160   if [ ! -z "$scsidisks" ]   echo "dialog \\"  > ${hwtmp}
161     echo "--backtitle \"${TITLE}\" \\" >> ${hwtmp}
162     echo "--ok-label \"Weiter\" \\" >> ${hwtmp}
163     echo "--stdout \\" >> ${hwtmp}
164     echo "--colors \\" >> ${hwtmp}
165     echo "--msgbox \"Gefundene Hardware:\n\n \\" >> ${hwtmp}
166     echo " Festplatten:\n \\" >> ${hwtmp}
167    
168     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
194     echo " \n \\" >> ${hwtmp}
195     echo " \\Z7andere Laufwerke:\n \\" >> ${hwtmp}
196     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   then
213   echo " \n \\" >> /tmp/hddtmp.sh   rm ${hwtmp}
  echo " \\Z7andere Laufwerke:\n \\" >> /tmp/hddtmp.sh  
  echo " CDROM: \\Z3$cdromdev\\Zn\n \\" >> /tmp/hddtmp.sh  
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() {  
  dialog \  
  --backtitle "$TITLE" \  
  --infobox "Installiere den System-Kernel ..." 3 70  
   
 }  
   
 dialog_install_hotfixes() {  
383   dialog \   dialog \
384   --backtitle "$TITLE" \   --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 ohne neustarten" `   "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  
  ;;  
424   esac   esac
425   fi   fi
426   done   done
# Line 346  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     cd ${INSTALLPATH} || die
524    }
525    
526   if [ -z $KRNVER ]  install_system_image()
527   then  {
528   KRNVER="AutoSta_LX"   tar xvjpf ${CDPATH}/system/${CDIMAGENAME} -C ${INSTALLPATH}
529   fi  }
530    
531   if [ -z $KRNIMG ]  install_bootsector_chroot()
532   then  {
533   KRNIMG="bzImage"   local my_roothdd
534   fi   local grubconf=${INSTALLPATH}/boot/grub/grub.conf
535     local grub2conf=${INSTALLPATH}/boot/grub/grub.cfg
536    
537   if [ -z $KRNINITRD ]   # check for grub2
538     if [[ -f ${INSTALLPATH}/sbin/grub-mkconfig ]]
539   then   then
540   KRNINITRD="initrd"   # needed by grub-mkconfig on the first run
541   fi   if [[ ! -f ${INSTALLPATH}/boot/grub/video.lst ]]
542     then
543   echo -e "default 0" > $INSTALLPATH/boot/grub/grub.conf || die   install -m0644 ${INSTALLPATH}/lib/grub/*/video.lst /boot/grub/video.lst
544   echo -e "timeout 03" >> $INSTALLPATH/boot/grub/grub.conf ||die   fi
545   #no support for splash image in 6.1-r2   echo 'grub-mkdevicemap' > ${INSTALLPATH}/root/.bashrc
546   #echo -e "splashimage=(hd0,0)/boot/grub/splash.xpm.gz" >> $INSTALLPATH/boot/grub/grub.conf || die   echo "LC_ALL=C grub-mkconfig -o ${grub2conf}" >> ${INSTALLPATH}/root/.bashrc
547   echo -e "\ntitle=${KRNVER}" >> $INSTALLPATH/boot/grub/grub.conf || die   echo "grub-install --no-floppy ${HDD}" >> ${INSTALLPATH}/root/.bashrc
  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  
548    
549   ### bootsector schreiben   # grub-legacy
550   #grub --no-floppy < $CONFIGS_TEMPLATE/grubsettings || die   else
551   /sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null || die   ### grubconf schreiben
552  root (hd0,0)   source ${INSTALLPATH}/boot/kernelversion
 setup (hd0)  
 quit  
 EOF  
 }  
553    
554  install_bootsector_chroot() {   #for alx only
555   ### grubconf schreiben   if [ -e ${INSTALLPATH}/etc/alx_version ]
556   #source $INSTALLPATH/INSTALL/kernel/kernelversion   then
557   source $INSTALLPATH/boot/kernelversion   OLD_ALXVER="${ALXVER}"
558     source ${INSTALLPATH}/etc/alx_version
559     KRNVER="ALX-${ALXVER}"
560     ALXVER="${OLD_ALXVER}"
561     fi
562    
563   #for alx only   [[ -z ${KRNVER} ]] && KRNVER="AutoSta_LX"
564   if [ -e ${INSTALLPATH}/etc/alx_version ]   [[ -z ${KRNINITRD} ]] && KRNINITRD="initrd"
565   then   [[ -z ${KRNIMG} ]] && KRNIMG="vmlinuz"
  OLD_ALXVER="${ALXVER}"  
  source ${INSTALLPATH}/etc/alx_version  
  KRNVER="ALX-${ALXVER}"  
  ALXVER="${OLD_ALXVER}"  
  fi  
   
  if [ -z "$KRNVER" ]  
  then  
  KRNVER="AutoSta_LX"  
  fi  
566    
567   if [ -z "$KRNIMG" ]   # uuid support
568   then   if is_uuid_supported
569   KRNIMG="bzImage"   then
570   fi   my_roothdd="UUID=$(get_uuid ${ROOTHDD})"
571     else
572     my_roothdd="${ROOTHDD}"
573     fi
574    
575   if [ -z "$KRNINITRD" ]   : > ${grubconf} || die
576   then   echo "default 0" >> ${grubconf} || die
577   KRNINITRD="initrd"   echo "timeout 3" >> ${grubconf} || die
578   fi   # using current root password
579     echo "password --md5 $(cat ${INSTALLPATH}/etc/shadow | grep root | cut -d: -f2)"  >> ${grubconf} || die
580    
581     echo  >> ${grubconf} || die
582     echo "# normal boot" >> ${grubconf} || die
583     echo "title ${KRNVER}" >> ${grubconf} || die
584     echo "root (hd0,0)" >> ${grubconf} || die
585     echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS}" >> ${grubconf} || die
586     if is_initrd_supported
587     then
588     echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die
589     fi
590    
591   echo -e "default 0" > $INSTALLPATH/boot/grub/grub.conf || die   echo >> ${grubconf} || die
592   echo -e "timeout 03" >> $INSTALLPATH/boot/grub/grub.conf ||die   echo "# admin boot" >> ${grubconf} || die
593     echo "title ${KRNVER} - Re-run hardware-detection" >> ${grubconf} || die
594   #no support for splash image in 6.1-r2   echo "lock"  >> ${grubconf} || die
595   #echo -e "splashimage=(hd0,0)/boot/grub/splash.xpm.gz" >> $INSTALLPATH/boot/grub/grub.conf || die   echo "root (hd0,0)" >> ${grubconf} || die
596     echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS} hardware-auto-detection" >> ${grubconf} || die
597   echo -e "\ntitle=${KRNVER}" >> $INSTALLPATH/boot/grub/grub.conf || die   if is_initrd_supported
598   echo -e "root (hd0,0)" >> $INSTALLPATH/boot/grub/grub.conf || die   then
599     echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die
600   #s3 cards don't support this   fi
  #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  
601    
602     echo >> ${grubconf} || die
603     echo "title ${KRNVER} - Reset *all* local settings" >> ${grubconf} || die
604     echo "lock"  >> ${grubconf} || die
605     echo "root (hd0,0)" >> ${grubconf} || die
606     echo "kernel /boot/${KRNIMG} root=${my_roothdd} ${KERNELOPTS} alx-reset-settings" >> ${grubconf} || die
607     if is_initrd_supported
608     then
609     echo "initrd /boot/${KRNINITRD}" >> ${grubconf} || die
610     fi
611    
612   ### bootsector schreiben chrooted schreiben (gentoo)   # bootsector schreiben chrooted schreiben (lfs/magellan)
613   if [ -f $INSTALLPATH/sbin/grub ]   cat > ${INSTALLPATH}/root/.bashrc << CHROOTEOF
614   then  /usr/sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null
  cat > $INSTALLPATH/root/.bashrc << CHROOTEOF  
 /sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null  
615  root (hd0,0)  root (hd0,0)
616  setup (hd0)  setup (hd0)
617  quit  quit
618  EOF  EOF
619  exit  exit 0
620  CHROOTEOF  CHROOTEOF
621   fi   fi
622    
623   ### bootsector schreiben chrooted schreiben (lfs/magellan)   ## enters chroot
624   if [ -f $INSTALLPATH/usr/sbin/grub ]   mount -t proc proc ${INSTALLPATH}/proc
625   then   mount -t sysfs sysfs ${INSTALLPATH}/sys
626   cat > $INSTALLPATH/root/.bashrc << CHROOTEOF   mount -o bind /dev ${INSTALLPATH}/dev
627  /usr/sbin/grub --no-floppy --batch << "EOF" 1> /dev/null 2> /dev/null   chroot ${INSTALLPATH} /bin/bash --rcfile /root/.bashrc -i
628  root (hd0,0)   umount ${INSTALLPATH}/proc
629  setup (hd0)   umount ${INSTALLPATH}/sys
630  quit   umount ${INSTALLPATH}/dev
631  EOF   rm ${INSTALLPATH}/root/.bashrc
632  exit  }
633    
634    is_initrd_supported()
635    {
636     # only generate initrds if the cmd exists
637     [[ -x ${INSTALLPATH}/sbin/mkinitrd ]] && return 0
638     return 1
639    }
640    
641    install_initrd_chroot()
642    {
643     # only generate initrds if the cmd exists
644     is_initrd_supported || return 0
645    
646     cat > ${INSTALLPATH}/root/.bashrc << CHROOTEOF
647    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
648    mkinitrd -f /boot/$(readlink /boot/initrd) $(readlink /boot/vmlinuz | sed "s:kernel-::g") > /dev/null
649    exit 0
650  CHROOTEOF  CHROOTEOF
651    
652     ## enters chroot
653     mount -t proc proc ${INSTALLPATH}/proc
654     mount -t sysfs sysfs ${INSTALLPATH}/sys
655     mount -o bind /dev ${INSTALLPATH}/dev
656     chroot ${INSTALLPATH} /bin/bash --rcfile /root/.bashrc -i
657     umount ${INSTALLPATH}/proc
658     umount ${INSTALLPATH}/sys
659     umount ${INSTALLPATH}/dev
660     rm ${INSTALLPATH}/root/.bashrc
661    }
662    
663    is_uuid_supported()
664    {
665     if [[ -x $(which busybox.mkinitrd &> /dev/null) ]]
666     then
667     # only detect uuids if supported
668     if [[ ! -z $(busybox.mkinitrd | grep blkid) ]]
669     then
670     return 0
671     fi
672   fi   fi
673    
674   ##enters chroot   return 1
  mount -t proc proc $INSTALLPATH/proc  
  chroot $INSTALLPATH /bin/bash  
  umount $INSTALLPATH/proc  
  rm $INSTALLPATH/root/.bashrc  
675  }  }
676    
677  install_alxconfig(){  get_uuid()
678   lastdir="`pwd`"  {
679     local UUID
680     local SEC_TYPE
681     local TYPE
682    
683   mkdir -p $INSTALLPATH/opt/alx-config || die   local dev="$1"
684   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  
685    
686   cd $lastdir || die   # check if given device is already an UUID
687     if [[ ${dev/UUID=/}x != ${dev}x ]]
688     then
689     eval "${dev}"
690     else
691     eval $(busybox.mkinitrd blkid ${dev} | grep "${dev}:" | sed 's/.*:\ //')
692     fi
693     echo "${UUID}"
694  }  }
695    
696    install_system_settings()
697    {
698     # schreibe fstab
699     if is_uuid_supported
700     then
701     echo -e "UUID=$(get_uuid ${BOOTHDD})\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALLPATH}/etc/fstab || die
702     echo -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLPATH}/etc/fstab || die
703     else
704     echo -e "${BOOTHDD}\t/boot\t${FORMAT_FILESYSTEM}\tnoatime,noauto\t1 1" > ${INSTALLPATH}/etc/fstab || die
705     echo -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" >> ${INSTALLPATH}/etc/fstab || die
706     fi
707     # not needed busybox loads all with swapon -a, even if not mentioned in fstab
708     #echo -e "UUID='$(get_uuid ${SWAPHDD})'\tswap\tswap\tpri=1\t0 0" >> ${INSTALLPATH}/etc/fstab || die
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  install_system_settings(){   # install network config skeleton
713   ### 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  
714  }  }
715    
716  install_hotfixes(){  install_system_settings_flash()
717   if [ -f $CDPATH/hotfixes/hotfixes.sh ]  {
718     # schreibe fstab
719     if is_uuid_supported
720   then   then
721   dialog_hotfixes   echo -e "UUID=$(get_uuid ${ROOTHDD})\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" > ${INSTALLPATH}/etc/fstab || die
722   sleep1   else
723   $CDPATH/hotfixes/hotfixes.sh   echo -e "${ROOTHDD}\t/\t${FORMAT_FILESYSTEM}\tnoatime\t0 0" > ${INSTALLPATH}/etc/fstab || die
724   fi   fi
725     echo -e "proc\t/proc\tproc\tdefaults\t0 0" >> ${INSTALLPATH}/etc/fstab || die
726     echo -e "shm\t/dev/shm\ttmpfs\tdefaults\t0 0" >> ${INSTALLPATH}/etc/fstab || die
727  }  }
728    
729  install_umount_rootfs() {  install_umount_rootfs()
730    {
731   cd /   cd /
732   umount $INSTALLPATH/boot || die   umount ${INSTALLPATH}/boot || die
733   umount $INSTALLPATH || die   umount ${INSTALLPATH} || die
734   swapoff $SWAPHDD || die   swapoff ${SWAPHDD} || die
735  }  }
736    
737  install_do_reboot() {  install_umount_rootfs_flash()
738    {
739   #only for now later it will be used again   cd /
740   #with 6.1-r2 these options are not available   umount ${INSTALLPATH} || die
741   #cd /  }
742   #umount $CDPATH  
743   #eject  install_do_reboot()
744   #clear  {
   
745   reboot   reboot
746  }  }
747    
# Line 608  install_do_reboot() { Line 749  install_do_reboot() {
749  #     Install Ablauf Scripte #  #     Install Ablauf Scripte #
750  #################################################  #################################################
751    
752  run_install_normal() {  run_install_normal()
753   #only for now later it will be used again  {
754   #with 6.1-r2 only one install method available   dialog_hardware_detection
755   #dialog_setup_hdd_menu  
  dialog_setup_hdd_found_manuell  
   
756   dialog_setup_hdd_partitions_manuell   dialog_setup_hdd_partitions_manuell
757   dialog_setup_hdd_format   dialog_setup_hdd_format
758   setup_hdd_format > /dev/null   setup_hdd_format > /dev/null
759   install_mount_rootfs   install_mount_rootfs
760   (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
761    
  #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  
   
  dialog_install_bootsector  
  install_bootsector_chroot  
   
  #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  
   
762   dialog_install_settings   dialog_install_settings
763   sleep 1   sleep 1
764   install_system_settings   install_system_settings
765   install_hotfixes   install_initrd_chroot
766    
767     dialog_install_bootsector
768     install_bootsector_chroot
769    
770   install_umount_rootfs   install_umount_rootfs
771   dialog_install_successful   dialog_install_successful
772  }  }
773    
774  run_install_silent() {  run_install_flash()
775   echo "starting silent install ..."  {
776     dialog_hardware_detection
777    
778     dialog_setup_hdd_partitions_manuell_flash
779     dialog_setup_hdd_format
780     setup_hdd_format_flash > /dev/null
781     install_mount_rootfs_flash
782     (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | dialog_install_meter | dialog_install_system_image
783    
784     dialog_install_settings
785   sleep 1   sleep 1
786     install_system_settings_flash
787     install_initrd_chroot
788    
789     dialog_install_bootsector
790     install_bootsector_chroot
791    
792     install_umount_rootfs_flash
793     dialog_install_successful
794  }  }
795    
796  run_install_unattended() {  run_install_auto()
797   echo "starting unattended install ..."  {
798     dialog_hardware_detection
799    
800     dialog_setup_hdd_partitions_auto
801     dialog_setup_hdd_format
802     setup_hdd_format_flash > /dev/null
803     install_mount_rootfs_flash
804     (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | dialog_install_meter | dialog_install_system_image
805    
806     dialog_install_settings
807   sleep 1   sleep 1
808     install_system_settings_flash
809     install_initrd_chroot
810    
811     dialog_install_bootsector
812     install_bootsector_chroot
813    
814     install_umount_rootfs_flash
815     dialog_install_successful
816  }  }
817    
818  if [ "$1" == "unattended" ]  dialog_main
 then  
  run_install_unattended  
 else  
  dialog_main  
 fi  
819    
820  exit 0  exit 0

Legend:
Removed from v.259  
changed lines
  Added in v.2554