CVS commit: [netbsd-8] src/usr.sbin/sysinst/arch/sgimips
Module Name:src Committed By: martin Date: Sun Sep 23 17:49:12 UTC 2018 Modified Files: src/usr.sbin/sysinst/arch/sgimips [netbsd-8]: md.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1032): usr.sbin/sysinst/arch/sgimips/md.c: revision 1.5 usr.sbin/sysinst/arch/sgimips/md.c: revision 1.6 PR port-sgimips/53583: fetch kernel name always before using it. Make the struct utsname local to avoid future similar issues. Make sure to install a bootloader even on upgrade installation. - Fixes another part of port-sgimips/53583. Should be pulled up (with rev 1.5) to netbsd-7 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.3.8.1 -r1.3.8.2 src/usr.sbin/sysinst/arch/sgimips/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/sgimips/md.c diff -u src/usr.sbin/sysinst/arch/sgimips/md.c:1.3.8.1 src/usr.sbin/sysinst/arch/sgimips/md.c:1.3.8.2 --- src/usr.sbin/sysinst/arch/sgimips/md.c:1.3.8.1 Sun Mar 18 11:21:47 2018 +++ src/usr.sbin/sysinst/arch/sgimips/md.c Sun Sep 23 17:49:12 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.3.8.1 2018/03/18 11:21:47 martin Exp $ */ +/* $NetBSD: md.c,v 1.3.8.2 2018/09/23 17:49:12 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -51,7 +51,6 @@ #include "msg_defs.h" #include "menu_defs.h" -struct utsname instsys; void md_init(void) @@ -61,13 +60,15 @@ md_init(void) void md_init_set_status(int flags) { + struct utsname instsys; + (void)flags; /* * Get the name of the Install Kernel we are running under and * enable the installation of the corresponding GENERIC kernel. */ -uname(); + uname(); if (strstr(instsys.version, "(INSTALL32_IP3x")) set_kernel_set(SET_KERNEL_2); else if (strstr(instsys.version, "(INSTALL32_IP2x")) @@ -156,7 +157,10 @@ md_pre_disklabel(void) int md_post_disklabel(void) { -if (strstr(instsys.version, "(INSTALL32_IP3x")) + struct utsname instsys; + uname(); + + if (strstr(instsys.version, "(INSTALL32_IP3x")) return run_program(RUN_DISPLAY, "%s %s", "/usr/mdec/sgivol -f -w boot /usr/mdec/ip3xboot", pm->diskdev); @@ -194,9 +198,12 @@ md_post_extract(void) void md_cleanup_install(void) { + struct utsname instsys; + #ifndef DEBUG enable_rc_conf(); #endif + uname(); if (strstr(instsys.version, "(GENERIC32_IP12")) run_program(0, "/usr/mdec/sgivol -f -w netbsd %s %s", @@ -213,7 +220,7 @@ md_pre_update(void) int md_update(void) { - md_post_newfs(); + md_post_disklabel(); return 1; }
CVS commit: [netbsd-8] src/usr.sbin/sysinst/arch/sgimips
Module Name:src Committed By: martin Date: Sun Mar 18 11:21:47 UTC 2018 Modified Files: src/usr.sbin/sysinst/arch/sgimips [netbsd-8]: md.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #643): usr.sbin/sysinst/arch/sgimips/md.c: revision 1.4 Official builds now append a timestamp to the kernel config name, so we can no longer rely on matching an exact name like "(INSTALL32_IP3x)". Strip the trailing ) from the version strings checked so sysinst will install the correct bootloader and kernel again. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.8.1 src/usr.sbin/sysinst/arch/sgimips/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/sgimips/md.c diff -u src/usr.sbin/sysinst/arch/sgimips/md.c:1.3 src/usr.sbin/sysinst/arch/sgimips/md.c:1.3.8.1 --- src/usr.sbin/sysinst/arch/sgimips/md.c:1.3 Fri Jan 2 19:43:13 2015 +++ src/usr.sbin/sysinst/arch/sgimips/md.c Sun Mar 18 11:21:47 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.3 2015/01/02 19:43:13 abs Exp $ */ +/* $NetBSD: md.c,v 1.3.8.1 2018/03/18 11:21:47 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -68,11 +68,11 @@ md_init_set_status(int flags) * enable the installation of the corresponding GENERIC kernel. */ uname(); -if (strstr(instsys.version, "(INSTALL32_IP3x)")) +if (strstr(instsys.version, "(INSTALL32_IP3x")) set_kernel_set(SET_KERNEL_2); -else if (strstr(instsys.version, "(INSTALL32_IP2x)")) +else if (strstr(instsys.version, "(INSTALL32_IP2x")) set_kernel_set(SET_KERNEL_1); - else if (strstr(instsys.version, "(GENERIC32_IP12)")) + else if (strstr(instsys.version, "(GENERIC32_IP12")) set_kernel_set(SET_KERNEL_3); } @@ -156,12 +156,12 @@ md_pre_disklabel(void) int md_post_disklabel(void) { -if (strstr(instsys.version, "(INSTALL32_IP3x)")) +if (strstr(instsys.version, "(INSTALL32_IP3x")) return run_program(RUN_DISPLAY, "%s %s", "/usr/mdec/sgivol -f -w boot /usr/mdec/ip3xboot", pm->diskdev); - if (strstr(instsys.version, "(INSTALL32_IP2x)")) { + if (strstr(instsys.version, "(INSTALL32_IP2x")) { run_program(RUN_DISPLAY, "%s %s", "/usr/mdec/sgivol -f -w aoutboot /usr/mdec/aoutboot", pm->diskdev); @@ -198,7 +198,7 @@ md_cleanup_install(void) enable_rc_conf(); #endif - if (strstr(instsys.version, "(GENERIC32_IP12)")) + if (strstr(instsys.version, "(GENERIC32_IP12")) run_program(0, "/usr/mdec/sgivol -f -w netbsd %s %s", target_expand("/netbsd.ecoff"), pm->diskdev); }