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