--- trunk/installer-simple/bin/installer.sh.in 2014/01/07 13:37:49 2416 +++ trunk/installer-simple/bin/installer.sh.in 2014/01/07 13:50:50 2421 @@ -146,78 +146,55 @@ dialog_hardware_detection() { - local i - local hwtmp - - if [ -x $(type -P mktemp) ] - then - hwtmp="$(mktemp)" - else - hwtmp="/tmp/hwtmp.sh" - fi + local message run_hardware_detection_disks - echo "dialog \\" > ${hwtmp} - echo "--backtitle \"${TITLE}\" \\" >> ${hwtmp} - echo "--ok-label \"Weiter\" \\" >> ${hwtmp} - echo "--stdout \\" >> ${hwtmp} - echo "--colors \\" >> ${hwtmp} - echo "--msgbox \"Gefundene Hardware:\n\n \\" >> ${hwtmp} - echo " Festplatten:\n \\" >> ${hwtmp} + message+=$"Harddrives:\n" if [[ ! -z ${ALL_DISKS} ]] then for i in ${ALL_DISKS} do - echo " \\Z3${i}\\Zn\n \\" >> ${hwtmp} + message+="\Z3${i}\Zn " done + message+="\n" fi if [[ ! -z ${ALL_CDROMS} ]] then - echo " \n \\" >> ${hwtmp} - echo " CDROM Laufwerke:\n \\" >> ${hwtmp} + message+="\n" + message+=$"Optical disk drives:\n" for i in ${ALL_CDROMS} do - echo " \\Z3${i}\\Zn\n \\" >> ${hwtmp} + message+="\Z3${i}\Zn" done + message+="\n" fi # other devices run_hardware_detection case "${SPECIALDEVICE}" in - zotac*) echo " \n\n\n \\Z2Zotac Device erkannt.\\Zn \\" >> ${hwtmp} ;; - rangee) echo " \n\n\n \\Z2Rangee Device erkannt.\\Zn \\" >> ${hwtmp} ;; - maxdata) echo " \n\n\n \\Z2Maxdata Device erkannt.\\Zn \\" >> ${hwtmp} ;; - *) echo " \n\n\n \\ZnStandard Device erkannt.\\Zn \\" >> ${hwtmp} ;; + zotac*) message+=$"\n\Z2Zotac device detected.\Zn" ;; + rangee) message+=$"\n\Z2Rangee device detected.\Zn" ;; + maxdata) message+=$"\n\Z2Maxdata device detected.\Zn" ;; + *) message+=$"\n \\ZnCommon device detected.\Zn" ;; esac if [[ ${FORMFACTOR} = laptop ]] then - echo " \n \\ZnFormfactor Laptop, Powersave Modus 'ondemand' wird aktiviert.\\Zn \\" >> ${hwtmp} + message+=$"\n\ZnFormfactor Laptop, activating 'ondemand' powersaving mode.\Zn" fi - echo " \" 14 70" >> ${hwtmp} - chmod a+x ${hwtmp} - ${hwtmp} - - # remove tmp file - if [[ -f ${hwtmp} ]] - then - rm ${hwtmp} - fi + messagebox -y 15 -h $"Detected hardware:" "${message}" } dialog_setup_hdd_partitions_manual() { local i - if [[ -z ${installdevs} ]] + if [[ -z ${ALL_DISKS} ]] then - dialog \ - --backtitle "${TITLE}" \ - --ok-label "Beenden" \ - --msgbox "Kein geeignetes Laufwerk gefunden.\nDie Installation ist fehlgeschlagen." 6 70 + dialog_no_harddrive_found exit 1 else @@ -228,7 +205,7 @@ echo "--stdout \\" >> /tmp/hddtmp.sh echo "--menu \"Installations Laufwerk auswaehlen:\" 10 70 3 \\" >> /tmp/hddtmp.sh - for i in ${installdevs} + for i in ${ALL_DISKS} do echo "\"${i}\" \"\" \\" >> /tmp/hddtmp.sh done @@ -250,12 +227,9 @@ { local i - if [[ -z ${installdevs} ]] + if [[ -z ${ALL_DISKS} ]] then - dialog \ - --backtitle "${TITLE}" \ - --ok-label "Beenden" \ - --msgbox "Kein geeignetes Laufwerk gefunden.\nDie Installation ist fehlgeschlagen." 6 70 + dialog_no_harddrive_found exit 1 else @@ -266,7 +240,7 @@ echo "--stdout \\" >> /tmp/hddtmp.sh echo "--menu \"Installations Laufwerk auswaehlen:\" 10 70 3 \\" >> /tmp/hddtmp.sh - for i in ${installdevs} + for i in ${ALL_DISKS} do echo "\"${i}\" \"\" \\" >> /tmp/hddtmp.sh done