From c3f3d5e22832fe98dafb6a853b79706a4f642bb7 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 6 Dec 2008 13:40:49 +0100 Subject: fix for only 1 lvm PV breakage --- src/core/libs/lib-ui-interactive.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/core/libs/lib-ui-interactive.sh') 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 -- cgit v1.2.3-54-g00ecf