summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-12-05 20:12:33 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-12-05 20:12:33 +0100
commitf0a54a12f56c5810759bcd030f977d06f6a35df8 (patch)
tree38e6c8395ee2ccd57b489f8044d21c538d429db7
parent25785c78530311c77b89c04b11a60f4ff83822f0 (diff)
fixes for LVM vgs
-rw-r--r--src/core/libs/lib-ui-interactive.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index ca1bb7f..d964c1c 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -332,13 +332,16 @@ interactive_filesystem ()
# ask special params, if relevant
if [ "$fs_type" = lvm-vg ]
then
+ # add $part to $fs_params if it's not in there because the user wants this enabled by default
+ grep -q ":$part:" <<< $fs_params || grep -q ":$part\$" <<< $fs_params || fs_params="$fs_params:$part"
+
for pv in `sed 's/:/ /' <<< $fs_params`
do
list="$list $pv ^ ON"
done
for pv in `grep ' lvm-pv' $BLOCK_DATA | awk '{print $1}'`
do
- ! grep -q "$pv ^ ON" && list="$list $pv - OFF"
+ ! grep -q "$pv ^ ON" $BLOCK_DATA && list="$list $pv - OFF"
done
_dia_DIALOG --checklist "Which lvm PV's must this volume group span?" 19 55 12 $list 2>$ANSWER || return 1
fs_params="$(sed 's/ /:/' $ANSWER)" #replace spaces by colon's, we cannot have spaces anywhere in any string