--- trunk/installer-simple/bin/installer.sh.in 2014/01/03 14:58:22 2343 +++ trunk/installer-simple/bin/installer.sh.in 2014/01/03 15:01:06 2344 @@ -187,7 +187,7 @@ hwtmp="/tmp/hwtmp.sh" fi - [[ ! -z ${installdevs} ]] && installdevs="" + run_hardware_detection_disks echo "dialog \\" > ${hwtmp} echo "--backtitle \"${TITLE}\" \\" >> ${hwtmp} @@ -197,37 +197,24 @@ echo "--msgbox \"Gefundene Hardware:\n\n \\" >> ${hwtmp} echo " Festplatten:\n \\" >> ${hwtmp} - if [[ ! -z ${scsidisks} ]] + if [[ ! -z ${ALL_DISKS} ]] then - for i in ${scsidisks} + for i in ${ALL_DISKS} do - if [[ ${i} != ${cdromdev} ]] - then - echo " \\Z7SCSI: \\Z3${i}\\Zn\n \\" >> ${hwtmp} - installdevs="${installdevs} ${i}" - fi + echo " \\Z3${i}\\Zn\n \\" >> ${hwtmp} done fi - if [[ ! -z ${idedisks} ]] + if [[ ! -z ${ALL_CDROMS} ]] then - for i in ${idedisks} + echo " \n \\" >> ${hwtmp} + echo " CDROM Laufwerke:\n \\" >> ${hwtmp} + for i in ${ALL_CDROMS} do - if [[ ${i} != ${cdromdev} ]] - then - echo " \\Z7IDE: \\Z3${i}\\Zn\n \\" >> ${hwtmp} - installdevs="${installdevs} ${i}" - fi + echo " \\Z3${i}\\Zn\n \\" >> ${hwtmp} done fi - if [[ ! -z ${cdromdev} ]] - then - echo " \n \\" >> ${hwtmp} - echo " \\Z7andere Laufwerke:\n \\" >> ${hwtmp} - echo " CDROM: \\Z3${cdromdev}\\Zn\n \\" >> ${hwtmp} - fi - # other devices run_hardware_detection case "${SPECIALDEVICE}" in @@ -367,6 +354,21 @@ fi } +run_hardware_detection_disks() +{ + local bootdev + + # all disks but exclude ramdisks + export ALL_DISKS=$(get_hwinfo disk | sed '/\/dev\/ram[0-9].*/d') + # remove the boot device from ALL_DISKS if it was an usbstick + if [[ $(grep '[[:space:]]/mnt/cdrom[[:space:]]' /proc/mounts | cut -d' ' -f3) != iso9660 ]] + then + bootdev="$(grep '[[:space:]]/mnt/cdrom[[:space:]]' /proc/mounts | cut -d' ' -f1 | sed 's:[0-9]::g')" + export ALL_DISKS=$(echo "${ALL_DISKS}" | grep -v "${bootdev}") + fi + export ALL_CDROMS="$(get_hwinfo cdrom)" +} + dialog_setup_hdd_create_partitions() { dialog \