bring back LVM config
This commit is contained in:
parent
e2140f8423
commit
e4a6cec294
2
config
2
config
@ -33,7 +33,7 @@ binaries="./busybox findfs blkid mount modprobe umount"
|
||||
use_lvm=1
|
||||
|
||||
# LVM include config
|
||||
#use_lvmconf=0
|
||||
#lvm_conf=1
|
||||
|
||||
# LVM issue_discards
|
||||
lvm_discard=1
|
||||
|
23
generate
23
generate
@ -23,9 +23,9 @@ remove_tmpdir() {
|
||||
|
||||
# change current directory to script directory if user haven't do it
|
||||
check_currentdir() {
|
||||
msg info "changing directory to script dir"
|
||||
script_dir=$(dirname $(readlink -f -- "$0"))
|
||||
[ "$PWD" = "$script_dir" ] || {
|
||||
msg info "changing directory to script dir"
|
||||
cd "$script_dir" || msg panic "failed to change directory"
|
||||
}
|
||||
}
|
||||
@ -113,16 +113,17 @@ install_lvm() {
|
||||
done
|
||||
}
|
||||
|
||||
# FIXME this code doesn't working with udev
|
||||
#mkdir "$tmpdir/etc/lvm"
|
||||
# use_lvmetad = 0 - avoid lvmetad missing warning message
|
||||
#cat <<EOF > "$tmpdir/etc/lvm/lvmlocal.conf"
|
||||
#local {
|
||||
# issue_discards = ${lvm_discard:-0}
|
||||
# use_lvmetad = 0
|
||||
#}
|
||||
#EOF
|
||||
# TODO implement use_lvmconf
|
||||
if [ "$lvm_conf" = 1 ]; then
|
||||
install -Dm644 /etc/lvm/*.conf -t "${tmpdir}/etc/lvm" || msg panic "failed to install LVM config"
|
||||
else
|
||||
mkdir "${tmpdir}/etc/lvm"
|
||||
cat <<EOF > "${tmpdir}/etc/lvm/lvmlocal.conf"
|
||||
local {
|
||||
issue_discards = ${lvm_discard:-0}
|
||||
use_lvmetad = 0
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
# handle luks
|
||||
|
Loading…
Reference in New Issue
Block a user