File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ mount_boot()
4545 exec /bin/usb-init
4646 ;;
4747 m )
48- skip_to_menu =" true"
48+ skip_gpg_check =" true"
4949 break
5050 ;;
5151 * )
571571fi
572572
573573# detect whether any GPG keys exist in the keyring, if not, initialize that first
574- [[ " $skip_to_menu " != " true" ]] && check_gpg_key && update_totp && update_hotp
574+ [[ " $skip_gpg_check " != " true" ]] && check_gpg_key
575+
576+ update_totp && update_hotp
575577
576578if [[ " $HOTP " = " Success" && $CONFIG_AUTO_BOOT_TIMEOUT ]]; then
577579 prompt_auto_default_boot
Original file line number Diff line number Diff line change @@ -43,6 +43,13 @@ hwclock -l -s
4343. /etc/functions
4444. /etc/config
4545
46+ # set CONFIG_TPM dynamically before init
47+ if [ -e /dev/tpm0 ]; then
48+ CONFIG_TPM=' y'
49+ else
50+ CONFIG_TPM=' n'
51+ fi
52+
4653# Specify whiptail background colors cues under FBWhiptail only
4754if [ -x /bin/fbwhiptail ]; then
4855 export BG_COLOR_WARNING=" ${CONFIG_WARNING_BG_COLOR:- " --background-gradient 0 0 0 150 125 0" } "
@@ -97,6 +104,12 @@ if [ "$boot_option" = "r" ]; then
97104 exit
98105fi
99106
107+ # Override CONFIG_TPM from /etc/config with runtime value determined above.
108+ #
109+ # Values in user config have higher priority during combining thus effectively
110+ # changing the value for the rest of the scripts which source /tmp/config.
111+ echo " export CONFIG_TPM=\" $CONFIG_TPM \" " >> /etc/config.user
112+
100113combine_configs
101114. /tmp/config
102115
You can’t perform that action at this time.
0 commit comments