mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 21:17:55 +00:00
init: Fixes for legacy-flash boards
Fix `[ -a` to POSIX `[ -e`. Only run cbfs-init, key-init on normal boards with bash. Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
This commit is contained in:
parent
0c4fdf343b
commit
5c33130ddc
12
initrd/init
12
initrd/init
@ -34,10 +34,10 @@ if [ ! -r /dev/ptmx ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Needed by bash
|
# Needed by bash
|
||||||
[ -a /dev/stdin ] || ln -s /proc/self/fd/0 /dev/stdin
|
[ -e /dev/stdin ] || ln -s /proc/self/fd/0 /dev/stdin
|
||||||
[ -a /dev/stdout ] || ln -s /proc/self/fd/1 /dev/stdout
|
[ -e /dev/stdout ] || ln -s /proc/self/fd/1 /dev/stdout
|
||||||
[ -a /dev/stderr ] || ln -s /proc/self/fd/2 /dev/stderr
|
[ -e /dev/stderr ] || ln -s /proc/self/fd/2 /dev/stderr
|
||||||
[ -a /dev/fd ] || ln -s /proc/self/fd /dev/fd
|
[ -e /dev/fd ] || ln -s /proc/self/fd /dev/fd
|
||||||
|
|
||||||
# Recovery shells will erase anything from here
|
# Recovery shells will erase anything from here
|
||||||
mkdir -p /tmp/secret
|
mkdir -p /tmp/secret
|
||||||
@ -78,7 +78,7 @@ if [ "$CONFIG_TPM2_TOOLS" = "y" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$CONFIG_COREBOOT" = "y" ]; then
|
if [ "$CONFIG_COREBOOT" = "y" ]; then
|
||||||
/bin/cbfs-init
|
[ -x /bin/bash ] && /bin/cbfs-init
|
||||||
fi
|
fi
|
||||||
if [ "$CONFIG_LINUXBOOT" = "y" ]; then
|
if [ "$CONFIG_LINUXBOOT" = "y" ]; then
|
||||||
/bin/uefi-init
|
/bin/uefi-init
|
||||||
@ -87,7 +87,7 @@ fi
|
|||||||
# Set GPG_TTY before calling gpg in key-init
|
# Set GPG_TTY before calling gpg in key-init
|
||||||
export GPG_TTY=/dev/console
|
export GPG_TTY=/dev/console
|
||||||
|
|
||||||
/bin/key-init
|
[ -x /bin/bash ] && /bin/key-init
|
||||||
|
|
||||||
# Setup recovery serial shell
|
# Setup recovery serial shell
|
||||||
if [ ! -z "$CONFIG_BOOT_RECOVERY_SERIAL" ]; then
|
if [ ! -z "$CONFIG_BOOT_RECOVERY_SERIAL" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user