mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-18 20:47:55 +00:00
Merge pull request #1772 from tlaurion/fix_config_user_reproducibility_for_undoing
init: make sure config.user is overriden only with new values so that going DEBUG/undoing can work reproducibly
This commit is contained in:
commit
3b22ae68e5
10
initrd/init
10
initrd/init
@ -140,8 +140,14 @@ fi
|
||||
#
|
||||
# Values in user config have higher priority during combining thus effectively
|
||||
# changing the value for the rest of the scripts which source /tmp/config.
|
||||
echo "export CONFIG_TPM=\"$CONFIG_TPM\"" >> /etc/config.user
|
||||
echo "export CONFIG_TPM2_TOOLS=\"$CONFIG_TPM2_TOOLS\"" >> /etc/config.user
|
||||
|
||||
#Only set CONFIG_TPM and CONFIG_TPM2_TOOLS if they are not already set in /etc/config.user
|
||||
if ! grep -q 'CONFIG_TPM=' /etc/config.user; then
|
||||
echo "export CONFIG_TPM=\"$CONFIG_TPM\"" >> /etc/config.user
|
||||
fi
|
||||
if ! grep -q 'CONFIG_TPM2_TOOLS=' /etc/config.user; then
|
||||
echo "export CONFIG_TPM2_TOOLS=\"$CONFIG_TPM2_TOOLS\"" >> /etc/config.user
|
||||
fi
|
||||
|
||||
# CONFIG_BASIC was previously CONFIG_PUREBOOT_BASIC in the PureBoot distribution.
|
||||
# Substitute it in config.user if present for backward compatibility.
|
||||
|
Loading…
Reference in New Issue
Block a user