diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-06 13:40:49 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-06 13:40:49 +0100 |
commit | c3f3d5e22832fe98dafb6a853b79706a4f642bb7 (patch) | |
tree | 24b36766c4755303a88daf53ae4279781d8c2df2 | |
parent | ba32e0816e86cbd44db7baa38ef4def7fe806b86 (diff) |
fix for only 1 lvm PV breakage
-rw-r--r-- | src/core/libs/lib-ui-interactive.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index aa00f5c..392a618 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -345,8 +345,15 @@ interactive_filesystem () do grep -q "$pv ON" <<< "$list" || list="$list $pv OFF" done - ask_checklist "Which lvm PV's must this volume group span?" $list || return 1 - fs_params="$(sed 's/ /:/' <<< "$ANSWER_CHECKLIST")" #replace spaces by colon's, we cannot have spaces anywhere in any string + list2=($list) + if [ ${#list2[*]} -lt 4 ] # less then 4 words in the list. eg only one option + then + notify "Automatically picked PV ${list2[0]}. It's the only available lvm PV" + fs_params=${list2[0]} + else + ask_checklist "Which lvm PV's must this volume group span?" $list || return 1 + fs_params="$(sed 's/ /:/' <<< "$ANSWER_CHECKLIST")" #replace spaces by colon's, we cannot have spaces anywhere in any string + fi fi if [ "$fs_type" = lvm-lv ] then |