xref: /netbsd-src/usr.sbin/sysinst/arch/amd64/md.c (revision 2f0931afd6bf02d284e674ebe88b4f8d6bade10a)
1*2f0931afSmartin /*	$NetBSD: md.c,v 1.2 2019/11/16 21:25:14 martin Exp $ */
250dbef1aSdholland 
350dbef1aSdholland /* md.c -- Machine specific code for amd64 */
450dbef1aSdholland 
550dbef1aSdholland #include "../i386/md.c"
6*2f0931afSmartin 
7*2f0931afSmartin void	amd64_md_boot_cfg_finalize(const char *path);
8*2f0931afSmartin 
9*2f0931afSmartin void
amd64_md_boot_cfg_finalize(const char * path)10*2f0931afSmartin amd64_md_boot_cfg_finalize(const char *path)
11*2f0931afSmartin {
12*2f0931afSmartin 	char buf[MAXPATHLEN];
13*2f0931afSmartin 
14*2f0931afSmartin 	if (get_kernel_set() != SET_KERNEL_2)
15*2f0931afSmartin 		return;
16*2f0931afSmartin 
17*2f0931afSmartin 	run_program(RUN_CHROOT|RUN_FATAL,
18*2f0931afSmartin 	    "sh -c 'sed -e \"s:;boot:;pkboot:\" "
19*2f0931afSmartin 	    "< %s > %s.1", path, path);
20*2f0931afSmartin 	snprintf(buf, sizeof buf, "%s.1", path);
21*2f0931afSmartin 	mv_within_target_or_die(buf, path);
22*2f0931afSmartin }
23