only use hwclock and gpg if the underlying components exist

This commit is contained in:
Trammell Hudson 2018-10-25 15:41:48 -04:00
parent 70d8bebf71
commit 507c7d6852
Failed to extract signature

View File

@ -36,7 +36,9 @@ if [ -r /etc/motd ]; then
fi
# Load the date from the hardware clock, setting it in local time
hwclock -l -s
if [ -r /dev/misc/rtc ]; then
hwclock -l -s
fi
# Read the system configuration parameters
. /etc/functions
@ -57,7 +59,10 @@ fi
if [ "$CONFIG_LINUXBOOT" = "y" ]; then
/bin/uefi-init
fi
/bin/key-init
if [ -x /bin/gpg ]; then
/bin/key-init
fi
# Setup recovery serial shell
if [ ! -z "$CONFIG_BOOT_RECOVERY_SERIAL" ]; then