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

Legend:
Removed from v.258  
changed lines
  Added in v.1574