From b6939b9927db72ef4a21351d0e6a76bc299ecba7 Mon Sep 17 00:00:00 2001 From: dflynn-Nokia <60479697+dflynn-Nokia@users.noreply.github.com> Date: Thu, 20 Jan 2022 21:27:10 -0500 Subject: [PATCH] [firsttime boot] suppress error message on platforms not supporting kdump (#9521) Why I did it Eliminate benign firsttime boot error reported when running on platforms that do not support kdump. How I did it Change rc.local to check for presence of the file /etc/default/kdump-tools before referencing it. How to verify it Install a new image on an armhf or arm64 platform and check for a failed reference to /etc/default/kdump-tools on firsttime boot. --- files/image_config/platform/rc.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/platform/rc.local b/files/image_config/platform/rc.local index 57fd8c4b06..b01c802f08 100755 --- a/files/image_config/platform/rc.local +++ b/files/image_config/platform/rc.local @@ -373,7 +373,7 @@ if [ -f $FIRST_BOOT_FILE ]; then mkdir -p /var/platform # Kdump tools configuration - sed -i -e "s/__PLATFORM__/$platform/g" /etc/default/kdump-tools + [ -f /etc/default/kdump-tools ] && sed -i -e "s/__PLATFORM__/$platform/g" /etc/default/kdump-tools firsttime_exit fi