From 12108f536aec7436b0e0eab713a2467ac23a7252 Mon Sep 17 00:00:00 2001 From: illiliti Date: Thu, 16 Apr 2020 07:37:45 +0300 Subject: [PATCH] move copying config to end of function --- tinyramfs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tinyramfs b/tinyramfs index 26ccd76..dfbef7a 100755 --- a/tinyramfs +++ b/tinyramfs @@ -217,12 +217,6 @@ install_lvm() install_binary "$_binary" done - # copy config - printf "%s\n" \ - lvm="$lvm" \ - lvm_opts="$lvm_opts" \ - >> "${workdir}/etc/config" - lvm_config=" devices { write_cache_state = 0 @@ -249,6 +243,12 @@ install_lvm() --config "$lvm_config" \ ${embed_lvm_config:+--mergedconfig} \ > "${workdir}/etc/lvm/lvm.conf" + + # copy config + printf "%s\n" \ + lvm="$lvm" \ + lvm_opts="$lvm_opts" \ + >> "${workdir}/etc/config" } install_luks() @@ -257,13 +257,6 @@ install_luks() 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 # see https://bugs.archlinux.org/task/56771 [ -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|") ;; esac; done + + # copy config + printf "%s\n" \ + luks="$luks" \ + luks_root="$luks_root" \ + luks_opts="$luks_opts" \ + >> "${workdir}/etc/config" } install_module()