Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jun 2018 01:26:57 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335272 - head/stand/efi/loader
Message-ID:  <201806170126.w5H1Qv4m032728@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Sun Jun 17 01:26:57 2018
New Revision: 335272
URL: https://svnweb.freebsd.org/changeset/base/335272

Log:
  Many netboot scenarios don't have /boot/defaults/loader.conf. As
  a fallback, also check /boot/kernel/kernel existing as well, since
  that's the fallback behavior of the loader.

Modified:
  head/stand/efi/loader/main.c

Modified: head/stand/efi/loader/main.c
==============================================================================
--- head/stand/efi/loader/main.c	Sun Jun 17 00:00:24 2018	(r335271)
+++ head/stand/efi/loader/main.c	Sun Jun 17 01:26:57 2018	(r335272)
@@ -220,7 +220,8 @@ sanity_check_currdev(void)
 {
 	struct stat st;
 
-	return (stat("/boot/defaults/loader.conf", &st) == 0);
+	return (stat("/boot/defaults/loader.conf", &st) == 0 ||
+	    stat("/boot/kernel/kernel", &st) == 0);
 }
 
 #ifdef EFI_ZFS_BOOT



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806170126.w5H1Qv4m032728>