diff options
-rw-r--r-- | release/sysinstall/disks.c | 15 | ||||
-rw-r--r-- | release/sysinstall/installUpgrade.c | 3 | ||||
-rw-r--r-- | usr.sbin/sade/disks.c | 15 | ||||
-rw-r--r-- | usr.sbin/sysinstall/disks.c | 15 | ||||
-rw-r--r-- | usr.sbin/sysinstall/installUpgrade.c | 3 |
5 files changed, 46 insertions, 5 deletions
diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c index 5297551..25108a4 100644 --- a/release/sysinstall/disks.c +++ b/release/sysinstall/disks.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: disks.c,v 1.96 1998/03/19 15:07:20 jkh Exp $ + * $Id: disks.c,v 1.97 1998/03/23 05:59:10 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -484,9 +484,19 @@ diskPartition(Device *dev) * disk (i.e., the disklabel starts at sector 0), even in cases where the user has requested * booteasy or a "standard" MBR -- both would be fatal in this case. */ +#if 0 if ((d->chunks->part->flags & CHUNK_FORCE_ALL) != CHUNK_FORCE_ALL && (mbrContents = getBootMgr(d->name)) != NULL) Set_Boot_Mgr(d, mbrContents); +#else + /* + * Don't offer to update the MBR on this disk if the first "real" chunk looks like + * a FreeBSD "all disk" partition, or the disk is entirely FreeBSD. + */ + if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1)) && + (mbrContents = getBootMgr(d->name)) != NULL) + Set_Boot_Mgr(d, mbrContents); +#endif break; default: @@ -611,6 +621,9 @@ diskPartitionWrite(dialogMenuItem *self) if (isDebug()) msgDebug("diskPartitionWrite: Examining %d devices\n", deviceCount(devs)); cp = variable_get(DISK_PARTITIONED); + if (cp && !strcmp(cp, "written")) + return DITEM_SUCCESS; + for (i = 0; devs[i]; i++) { Chunk *c1; Disk *d = (Disk *)devs[i]->private; diff --git a/release/sysinstall/installUpgrade.c b/release/sysinstall/installUpgrade.c index ea7b9d2..a04933b 100644 --- a/release/sysinstall/installUpgrade.c +++ b/release/sysinstall/installUpgrade.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: installUpgrade.c,v 1.54 1997/10/29 07:47:06 jkh Exp $ + * $Id: installUpgrade.c,v 1.55 1998/03/21 02:08:52 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -242,6 +242,7 @@ installUpgrade(dialogMenuItem *self) return DITEM_FAILURE | DITEM_RESTORE; } chdir("/"); + installEnvironment(); systemCreateHoloshell(); } diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c index 5297551..25108a4 100644 --- a/usr.sbin/sade/disks.c +++ b/usr.sbin/sade/disks.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: disks.c,v 1.96 1998/03/19 15:07:20 jkh Exp $ + * $Id: disks.c,v 1.97 1998/03/23 05:59:10 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -484,9 +484,19 @@ diskPartition(Device *dev) * disk (i.e., the disklabel starts at sector 0), even in cases where the user has requested * booteasy or a "standard" MBR -- both would be fatal in this case. */ +#if 0 if ((d->chunks->part->flags & CHUNK_FORCE_ALL) != CHUNK_FORCE_ALL && (mbrContents = getBootMgr(d->name)) != NULL) Set_Boot_Mgr(d, mbrContents); +#else + /* + * Don't offer to update the MBR on this disk if the first "real" chunk looks like + * a FreeBSD "all disk" partition, or the disk is entirely FreeBSD. + */ + if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1)) && + (mbrContents = getBootMgr(d->name)) != NULL) + Set_Boot_Mgr(d, mbrContents); +#endif break; default: @@ -611,6 +621,9 @@ diskPartitionWrite(dialogMenuItem *self) if (isDebug()) msgDebug("diskPartitionWrite: Examining %d devices\n", deviceCount(devs)); cp = variable_get(DISK_PARTITIONED); + if (cp && !strcmp(cp, "written")) + return DITEM_SUCCESS; + for (i = 0; devs[i]; i++) { Chunk *c1; Disk *d = (Disk *)devs[i]->private; diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c index 5297551..25108a4 100644 --- a/usr.sbin/sysinstall/disks.c +++ b/usr.sbin/sysinstall/disks.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: disks.c,v 1.96 1998/03/19 15:07:20 jkh Exp $ + * $Id: disks.c,v 1.97 1998/03/23 05:59:10 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -484,9 +484,19 @@ diskPartition(Device *dev) * disk (i.e., the disklabel starts at sector 0), even in cases where the user has requested * booteasy or a "standard" MBR -- both would be fatal in this case. */ +#if 0 if ((d->chunks->part->flags & CHUNK_FORCE_ALL) != CHUNK_FORCE_ALL && (mbrContents = getBootMgr(d->name)) != NULL) Set_Boot_Mgr(d, mbrContents); +#else + /* + * Don't offer to update the MBR on this disk if the first "real" chunk looks like + * a FreeBSD "all disk" partition, or the disk is entirely FreeBSD. + */ + if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1)) && + (mbrContents = getBootMgr(d->name)) != NULL) + Set_Boot_Mgr(d, mbrContents); +#endif break; default: @@ -611,6 +621,9 @@ diskPartitionWrite(dialogMenuItem *self) if (isDebug()) msgDebug("diskPartitionWrite: Examining %d devices\n", deviceCount(devs)); cp = variable_get(DISK_PARTITIONED); + if (cp && !strcmp(cp, "written")) + return DITEM_SUCCESS; + for (i = 0; devs[i]; i++) { Chunk *c1; Disk *d = (Disk *)devs[i]->private; diff --git a/usr.sbin/sysinstall/installUpgrade.c b/usr.sbin/sysinstall/installUpgrade.c index ea7b9d2..a04933b 100644 --- a/usr.sbin/sysinstall/installUpgrade.c +++ b/usr.sbin/sysinstall/installUpgrade.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: installUpgrade.c,v 1.54 1997/10/29 07:47:06 jkh Exp $ + * $Id: installUpgrade.c,v 1.55 1998/03/21 02:08:52 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -242,6 +242,7 @@ installUpgrade(dialogMenuItem *self) return DITEM_FAILURE | DITEM_RESTORE; } chdir("/"); + installEnvironment(); systemCreateHoloshell(); } |