From 507c7d6852ffdb76a2c6d7e0505033fcaf74a6e6 Mon Sep 17 00:00:00 2001 From: Trammell Hudson Date: Thu, 25 Oct 2018 15:41:48 -0400 Subject: [PATCH] only use hwclock and gpg if the underlying components exist --- initrd/init | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/initrd/init b/initrd/init index d489f6ae..80415f5e 100755 --- a/initrd/init +++ b/initrd/init @@ -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