mirror of
https://github.com/linuxboot/heads.git
synced 2025-02-20 09:16:21 +00:00
Move custom configs below recovery shell
For safety it would be better if we source any custom configs after the recovery shell in init. That way we can recover from any config mistakes.
This commit is contained in:
parent
8b8be510a2
commit
ab0f9dd32e
24
initrd/init
24
initrd/init
@ -49,18 +49,6 @@ if [ "$CONFIG_LINUXBOOT" = "y" ]; then
|
||||
/bin/uefi-init
|
||||
fi
|
||||
|
||||
combine_configs
|
||||
. /tmp/config
|
||||
|
||||
# Add our boot devices into the /etc/fstab, if they are defined
|
||||
# in the configuration file.
|
||||
if [ ! -z "$CONFIG_BOOT_DEV" ]; then
|
||||
echo >> /etc/fstab "$CONFIG_BOOT_DEV /boot auto defaults,ro 0 0"
|
||||
fi
|
||||
if [ ! -z "$CONFIG_USB_BOOT_DEV" ]; then
|
||||
echo >> /etc/fstab "$CONFIG_USB_BOOT_DEV /media auto defaults,ro 0 0"
|
||||
fi
|
||||
|
||||
/bin/key-init
|
||||
|
||||
# Setup recovery serial shell
|
||||
@ -91,6 +79,18 @@ if [ "$boot_option" = "r" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
combine_configs
|
||||
. /tmp/config
|
||||
|
||||
# Add our boot devices into the /etc/fstab, if they are defined
|
||||
# in the configuration file.
|
||||
if [ ! -z "$CONFIG_BOOT_DEV" ]; then
|
||||
echo >> /etc/fstab "$CONFIG_BOOT_DEV /boot auto defaults,ro 0 0"
|
||||
fi
|
||||
if [ ! -z "$CONFIG_USB_BOOT_DEV" ]; then
|
||||
echo >> /etc/fstab "$CONFIG_USB_BOOT_DEV /media auto defaults,ro 0 0"
|
||||
fi
|
||||
|
||||
if [ ! -x "$CONFIG_BOOTSCRIPT" -a ! -x "$CONFIG_BOOTSCRIPT_NETWORK" ]; then
|
||||
recovery 'Boot script missing? Entering recovery shell'
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user