Commit 90f78c09 authored by Natanael Copa's avatar Natanael Copa

setup-disk: only install lvm2 if it will be used

parent 2d7ee0af
...@@ -436,8 +436,9 @@ stop_all_raid() { ...@@ -436,8 +436,9 @@ stop_all_raid() {
# install needed programs # install needed programs
init_progs() { init_progs() {
local raidpkg= fs= fstools= local raidpkg= lvmpkg= fs= fstools=
[ -n "$USE_RAID" ] && raidpkg="mdadm" [ -n "$USE_RAID" ] && raidpkg="mdadm"
[ -n "$USE_LVM" ] && lvmpkg="lvm2"
for fs in $BOOTFS $ROOTFS $VARFS; do for fs in $BOOTFS $ROOTFS $VARFS; do
# we need load btrfs module early to avoid the error message: # we need load btrfs module early to avoid the error message:
# 'failed to open /dev/btrfs-control' # 'failed to open /dev/btrfs-control'
...@@ -449,7 +450,7 @@ init_progs() { ...@@ -449,7 +450,7 @@ init_progs() {
btrfs) fstools="$fstools btrfs-progs";; btrfs) fstools="$fstools btrfs-progs";;
esac esac
done done
apk add --quiet sfdisk lvm2 $raidpkg syslinux $fstools $@ apk add --quiet sfdisk $lvmpkg $raidpkg syslinux $fstools $@
} }
show_disk_info() { show_disk_info() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment