From b376a7d60f0fc000582c71a8fa6d1e0240b5421f Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Wed, 22 Apr 2020 17:54:38 -0500 Subject: [PATCH] ShellPkg: disable startup script, show welcome banner Startup script does nothing other than confuse users. Show a welcome banner and tell users how to exit. Signed-off-by: Matt DeVillier --- ShellPkg/Application/Shell/Shell.c | 7 ++++++- ShellPkg/Application/Shell/Shell.uni | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c index a556307097..a12868a0e5 100644 --- a/ShellPkg/Application/Shell/Shell.c +++ b/ShellPkg/Application/Shell/Shell.c @@ -587,11 +587,16 @@ UefiMain ( ConInHandle = NULL; } - if (!EFI_ERROR(Status) && PcdGet8(PcdShellSupportLevel) >= 1) { + if (FALSE && !EFI_ERROR(Status) && PcdGet8(PcdShellSupportLevel) >= 1) { // // process the startup script or launch the called app. // Status = DoStartupScript(ShellInfoObject.ImageDevPath, ShellInfoObject.FileDevPath); + } else { + // + // show welcome notice + // + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_WELCOME), ShellInfoObject.HiiHandle); } if (!ShellInfoObject.ShellInitSettings.BitUnion.Bits.Exit && !ShellCommandGetExit() && (PcdGet8(PcdShellSupportLevel) >= 3 || PcdGetBool(PcdShellForceConsole)) && !EFI_ERROR(Status) && !ShellInfoObject.ShellInitSettings.BitUnion.Bits.NoConsoleIn) { diff --git a/ShellPkg/Application/Shell/Shell.uni b/ShellPkg/Application/Shell/Shell.uni index 7dd0072601..ff16c401c3 100644 --- a/ShellPkg/Application/Shell/Shell.uni +++ b/ShellPkg/Application/Shell/Shell.uni @@ -50,3 +50,4 @@ #string STR_SHELL_IMAGE_NOT_APP #language en-US "The image is not an application.\r\n" +#string STR_SHELL_WELCOME #language en-US "\r\nWelcome to the UEFI Shell!\r\n\r\nIf you wound up here by mistake, just type 'exit' to return to the UEFI Options Menu.\r\n\r\n"