From 2ae5ed5db0b9ef2f17e4b53e0ac330b041c765a7 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Fri, 1 Mar 2013 00:03:01 +0100 Subject: [PATCH] installer: fix setup unwanted reboot if size of destination not found. --- src/install+setup/install/mountdest.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/install+setup/install/mountdest.sh b/src/install+setup/install/mountdest.sh index e28a0689bd..16cf6ed4d3 100644 --- a/src/install+setup/install/mountdest.sh +++ b/src/install+setup/install/mountdest.sh @@ -111,11 +111,15 @@ for path in /sys/block/*; do echo " OK, this is it..." echo -n "${device_}" > /tmp/dest_device - # Disk size to GiB. - device_size=$(( ${device_size} / 2097152 )) - - # Build string with drive details - device_str="/dev/${device_} - ${device_size} GiB -" + if [ ${device_size} -gt 0 ]; then + # Disk size to GiB. + device_size=$(( ${device_size} / 2097152 )) + + # Build string with drive details + device_str="/dev/${device_} - ${device_size} GiB -" + else + device_str="/dev/${device_} -" + fi device_str="${device_str} $(cat /sys/block/${device}/device/vendor)" device_str="${device_str} $(cat /sys/block/${device}/device/model)" -- 2.39.5