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.
This commit is contained in:
Warner Losh 2018-06-17 01:26:57 +00:00
parent 5d9573acf2
commit 02cff72a7b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335272

View File

@ -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