mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-18 20:47:55 +00:00
init: make sure config.user is overriden only with new values so that going DEBUG/undoing can work reproducibly
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
parent
51ade5bd10
commit
f06867306e
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