2020-06-28 09:28:57 +05:30
|
|
|
# vim: set ft=sh:
|
2020-07-03 21:19:09 +05:30
|
|
|
# shellcheck shell=sh
|
|
|
|
#
|
|
|
|
# false positive
|
|
|
|
# shellcheck disable=2154
|
|
|
|
#
|
|
|
|
# word splitting is safe by design
|
|
|
|
# shellcheck disable=2086
|
2020-06-28 09:28:57 +05:30
|
|
|
{
|
|
|
|
[ "$hostonly" = 1 ] &&
|
|
|
|
for _module in \
|
|
|
|
dm-log dm-cache dm-mirror \
|
|
|
|
dm-snapshot dm-multipath dm-thin-pool
|
|
|
|
do
|
|
|
|
copy_module "$_module"
|
|
|
|
done
|
|
|
|
|
|
|
|
copy_binary lvm
|
|
|
|
|
|
|
|
lvm_config="
|
|
|
|
devices {
|
|
|
|
write_cache_state = 0
|
|
|
|
}
|
|
|
|
backup {
|
|
|
|
backup = 0
|
|
|
|
archive = 0
|
|
|
|
}
|
|
|
|
global {
|
|
|
|
use_lvmetad = 0
|
|
|
|
}"
|
|
|
|
|
|
|
|
IFS=,; set -- $lvm_opts; unset IFS
|
|
|
|
|
|
|
|
for opt; do case "$opt" in
|
|
|
|
config=1) embed_lvm_config=
|
|
|
|
esac; done
|
|
|
|
|
|
|
|
mkdir -p "${tmpdir}/etc/lvm"
|
|
|
|
|
|
|
|
lvm config \
|
|
|
|
--config "$lvm_config" \
|
|
|
|
${embed_lvm_config+--mergedconfig} \
|
|
|
|
> "${tmpdir}/etc/lvm/lvm.conf"
|
|
|
|
}
|
|
|
|
|