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

Legend:
Removed from v.260  
changed lines
  Added in v.2557