Module Name: src
Committed By: martin
Date: Mon Nov 18 16:05:55 UTC 2019
Modified Files:
src/usr.sbin/sysinst/arch/i386: md.c
Log Message:
Fix previous: not a good idea to try to copy files from the not yet
extracted sets.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/sysinst/arch/i386/md.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/sysinst/arch/i386/md.c
diff -u src/usr.sbin/sysinst/arch/i386/md.c:1.25 src/usr.sbin/sysinst/arch/i386/md.c:1.26
--- src/usr.sbin/sysinst/arch/i386/md.c:1.25 Mon Nov 18 08:16:32 2019
+++ src/usr.sbin/sysinst/arch/i386/md.c Mon Nov 18 16:05:55 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.25 2019/11/18 08:16:32 martin Exp $ */
+/* $NetBSD: md.c,v 1.26 2019/11/18 16:05:55 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -376,13 +376,6 @@ md_post_newfs_uefi(struct install_partit
int
md_post_newfs(struct install_partition_desc *install)
{
-#if defined(__amd64__)
- int ret;
-
- ret = cp_within_target("/usr/mdec/prekern", "/prekern", 0);
- if (ret)
- return ret;
-#endif
return uefi_boot ? md_post_newfs_uefi(install)
: md_post_newfs_bios(install);
@@ -391,6 +384,15 @@ md_post_newfs(struct install_partition_d
int
md_post_extract(struct install_partition_desc *install)
{
+#if defined(__amd64__)
+ if (get_kernel_set() == SET_KERNEL_2) {
+ int ret;
+
+ ret = cp_within_target("/usr/mdec/prekern", "/prekern", 0);
+ if (ret)
+ return ret;
+ }
+#endif
return 0;
}