summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-03-05 21:08:55 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-03-05 21:08:55 +0100
commitb7a87de6512d3864b4b6dec5b0a6f91fc832e131 (patch)
tree947c0eefef017739e8941117356e7509443b8d8a
parent528ebe9f23bb78ed20f4a87ec2d5c92c12fe16fa (diff)
fix + crashfix when no disks found
-rw-r--r--src/core/libs/lib-ui-interactive.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index 5aedda2..9ee8668 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -242,10 +242,13 @@ interactive_autoprepare()
notify "Available Disks:\n\n$(_getavaildisks)\n"
ask_option no 'Harddrive selection' "Select the hard drive to use" required $(finddisks 1 _) || return 1
DISC=$ANSWER_OPTION
+ elif [ -z "$DISCS" ]; then
+ ask_string "Could not find disk. Please enter path of devicefile manually" "" || return 1
+ DISC=$ANSWER_STRING
else
DISC=$DISCS
fi
-
+ # TODO : some checks if $DISC is really a blockdevice is probably a good idea
DISC=${DISC// /} # strip all whitespace. we need this for some reason.TODO: find out why
get_blockdevice_size $DISC MiB
@@ -910,7 +913,7 @@ interactive_grub() {
DEVS=$(finddisks 1 _)
DEVS="$DEVS $(findpartitions 1 _)"
- if [ "$DEVS" = "" ]; then
+ if [ "$DEVS" = " " ]; then
notify "No hard drives were found"
return 1
fi