summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-05-06 06:25:41 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-05-06 06:25:41 +0000
commit78d5d2fe3f2e8dd216ab5adb77fe71ca2a34b01f (patch)
tree85ccc9af6dc2be78ee45a1ba290e233c723fc844
parent3d93bc1d75a4c9dd55ad9e4f72fada32a02d3c13 (diff)
downloadalpine-conf-78d5d2fe3f2e8dd216ab5adb77fe71ca2a34b01f.tar.bz2
alpine-conf-78d5d2fe3f2e8dd216ab5adb77fe71ca2a34b01f.tar.xz
setup-disk: give option to use lvm
Give the option so enable lvm when asking how o use selected disk
-rw-r--r--setup-disk.in23
1 files changed, 20 insertions, 3 deletions
diff --git a/setup-disk.in b/setup-disk.in
index 788856a..9444b7e 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -832,7 +832,7 @@ __EOF__
diskmode_help() {
cat <<__EOF__
-You can select between 'sys' or 'data'.
+You can select between 'sys', 'data', 'lvm', 'lvmsys' or 'lvmdata'.
sys:
This mode is a traditional disk install. The following partitions will be
@@ -847,6 +847,15 @@ data:
Use this mode if you only want to use the disk(s) for a mailspool, databases,
logs, etc.
+lvm:
+ Enable logical volume manager and ask again for 'sys' or 'data'.
+
+lvmsys:
+ Same as 'sys' but use logical volume manager for partitioning.
+
+lvmdata:
+ Same as 'data' but use logical volume manager for partitioning.
+
__EOF__
}
@@ -993,13 +1002,21 @@ if [ -n "$diskdevs" ] && [ -z "$DISK_MODE" ]; then
fi
while true; do
- echo "The following $disk_is_or_disks_are selected:"
+ echo "The following $disk_is_or_disks_are selected${USE_LVM:+ (with LVM)}:"
show_disk_info $diskdevs
- echon "How would you like to use $it_them? ('sys', 'data' or '?' for help) [?] "
+ local _lvm=${USE_LVM:-", 'lvm'"}
+ echon "How would you like to use $it_them? ('sys', 'data'${_lvm#_lvm} or '?' for help) [?] "
default_read answer '?'
case "$answer" in
'?') diskmode_help;;
sys|data) break;;
+ lvm) USE_LVM="_lvm" ;;
+ nolvm) USE_LVM="";;
+ lvmsys|lvmdata)
+ answer=${answer#lvm}
+ USE_LVM="_lvm"
+ break
+ ;;
esac
done
DISK_MODE="$answer"