move copying config to end of function

This commit is contained in:
illiliti 2020-04-16 07:37:45 +03:00
parent a44fa55f2b
commit 12108f536a

View File

@ -217,12 +217,6 @@ install_lvm()
install_binary "$_binary" install_binary "$_binary"
done done
# copy config
printf "%s\n" \
lvm="$lvm" \
lvm_opts="$lvm_opts" \
>> "${workdir}/etc/config"
lvm_config=" lvm_config="
devices { devices {
write_cache_state = 0 write_cache_state = 0
@ -249,6 +243,12 @@ install_lvm()
--config "$lvm_config" \ --config "$lvm_config" \
${embed_lvm_config:+--mergedconfig} \ ${embed_lvm_config:+--mergedconfig} \
> "${workdir}/etc/lvm/lvm.conf" > "${workdir}/etc/lvm/lvm.conf"
# copy config
printf "%s\n" \
lvm="$lvm" \
lvm_opts="$lvm_opts" \
>> "${workdir}/etc/config"
} }
install_luks() install_luks()
@ -257,13 +257,6 @@ install_luks()
install_binary cryptsetup install_binary cryptsetup
# copy config
printf "%s\n" \
luks="$luks" \
luks_root="$luks_root" \
luks_opts="$luks_opts" \
>> "${workdir}/etc/config"
# avoid libgcc_s.so.1 missing error # avoid libgcc_s.so.1 missing error
# see https://bugs.archlinux.org/task/56771 # see https://bugs.archlinux.org/task/56771
[ -e /usr/lib/libgcc_s.so.1 ] && install_library /usr/lib/libgcc_s.so.1 [ -e /usr/lib/libgcc_s.so.1 ] && install_library /usr/lib/libgcc_s.so.1
@ -282,6 +275,13 @@ install_luks()
luks_opts=$(printf "%s" "$luks_opts" | sed "s|${opt##*=}|/root/key|") luks_opts=$(printf "%s" "$luks_opts" | sed "s|${opt##*=}|/root/key|")
;; ;;
esac; done esac; done
# copy config
printf "%s\n" \
luks="$luks" \
luks_root="$luks_root" \
luks_opts="$luks_opts" \
>> "${workdir}/etc/config"
} }
install_module() install_module()