Module Name: src
Committed By: phx
Date: Sun Aug 21 13:40:08 UTC 2011
Modified Files:
src/distrib/utils/sysinst/arch/ofppc: md.c
Log Message:
Unmounting /targetroot in md_post_newfs() is not needed.
Use target_prefix() instead of /mnt2 in md_post_extract().
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/distrib/utils/sysinst/arch/ofppc/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/distrib/utils/sysinst/arch/ofppc/md.c
diff -u src/distrib/utils/sysinst/arch/ofppc/md.c:1.8 src/distrib/utils/sysinst/arch/ofppc/md.c:1.9
--- src/distrib/utils/sysinst/arch/ofppc/md.c:1.8 Mon Apr 4 08:30:39 2011
+++ src/distrib/utils/sysinst/arch/ofppc/md.c Sun Aug 21 13:40:08 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.8 2011/04/04 08:30:39 mbalmer Exp $ */
+/* $NetBSD: md.c,v 1.9 2011/08/21 13:40:08 phx Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -297,8 +297,7 @@
md_post_newfs(void)
{
- /* just in case */
- run_program(RUN_DISPLAY, "/sbin/umount /targetroot/boot");
+ /* No bootblock. We use ofwboot from a partition visiable by OFW. */
return 0;
}
@@ -316,25 +315,16 @@
"/tmp/bootinfo.txt", version, bootinfo_mbr);
if (!nobootfix) {
- snprintf(bootdev, sizeof bootdev, "/dev/r%s%c", diskdev,
- 'a'+bootpart_fat12);
- snprintf(bootbdev, sizeof bootbdev, "/dev/%s%c", diskdev,
- 'a'+bootpart_fat12);
-
- if (nonewfsmsdos == 0)
- run_program(RUN_DISPLAY, "/sbin/newfs_msdos %s",
- bootdev);
- run_program(RUN_DISPLAY, "/sbin/mount_msdos %s /mnt2",
- bootbdev);
- run_program(RUN_DISPLAY, "/bin/mkdir -p /mnt2/ppc");
- run_program(RUN_DISPLAY, "/bin/mkdir -p /mnt2/netbsd");
+ run_program(RUN_DISPLAY, "/bin/mkdir -p /%s/boot/ppc",
+ target_prefix());
+ run_program(RUN_DISPLAY, "/bin/mkdir -p /%s/boot/netbsd",
+ target_prefix());
run_program(RUN_DISPLAY, "/bin/cp /usr/mdec/ofwboot "
- "/mnt2/netbsd");
+ "/%s/boot/netbsd", target_prefix());
run_program(RUN_DISPLAY, "/bin/cp /tmp/bootinfo.txt "
- "/mnt2/ppc");
- run_program(RUN_DISPLAY,
- "/bin/cp /usr/mdec/ofwboot /mnt2/ofwboot");
- run_program(RUN_DISPLAY, "/sbin/umount /mnt2");
+ "/%s/boot/ppc", target_prefix());
+ run_program(RUN_DISPLAY, "/bin/cp /usr/mdec/ofwboot "
+ "/%s/boot/ofwboot", target_prefix());
}
if (!noprepfix) {