summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r--usr.sbin/sysinstall/Makefile14
-rw-r--r--usr.sbin/sysinstall/disks.c20
-rw-r--r--usr.sbin/sysinstall/help/partition.hlp7
-rw-r--r--usr.sbin/sysinstall/help/slice.hlp7
-rw-r--r--usr.sbin/sysinstall/install.c15
-rw-r--r--usr.sbin/sysinstall/sysinstall.h3
6 files changed, 35 insertions, 31 deletions
diff --git a/usr.sbin/sysinstall/Makefile b/usr.sbin/sysinstall/Makefile
index 97ef30f..3d5f05c 100644
--- a/usr.sbin/sysinstall/Makefile
+++ b/usr.sbin/sysinstall/Makefile
@@ -10,16 +10,19 @@ SRCS= anonFTP.c apache.c attr.c cdrom.c command.c config.c devices.c \
label.c lndir.c main.c makedevs.c media.c menus.c misc.c \
msg.c network.c nfs.c options.c package.c samba.c system.c \
tape.c tcpip.c termcap.c ufs.c variable.c wizard.c \
- uc_eisa.c uc_isa.c uc_kmem.c uc_list.c uc_main.c uc_pci.c uc_scsi.c
+ uc_eisa.c uc_isa.c uc_kmem.c uc_list.c uc_main.c uc_pci.c \
+ uc_scsi.c
-CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I/sys -DUC_PRIVATE
+CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR} -I/sys
+CFLAGS+= -DUC_PRIVATE -DKERN_NO_SYMBOLS
#CFLAGS+= -DLOAD_CONFIG_FILE=\"install.cfg\"
DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK}
LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk
-makedevs.c: Makefile rtermcap
+
+makedevs.c: Makefile rtermcap dumpnlist
rm -f makedevs.tmp
echo '#include <sys/types.h>' > makedevs.tmp
./rtermcap cons25 | \
@@ -44,6 +47,11 @@ makedevs.c: Makefile rtermcap
file2c 'const char termcap_vt100[] = {' ',0};' \
>> makedevs.tmp
mv makedevs.tmp makedevs.c
+.if defined(KERNEL_NAME)
+ dumpnlist ${KERNEL_NAME} > kern-nlist.h
+.else
+ dumpnlist /kernel > kern-nlist.h
+.endif
rtermcap: ${.CURDIR}/rtermcap.c
${CC} -o rtermcap ${.CURDIR}/rtermcap.c -ltermcap
diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c
index 6a1ca93..b66c992 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.65 1996/10/01 04:56:31 jkh Exp $
+ * $Id: disks.c,v 1.66 1996/10/03 06:01:31 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -181,10 +181,10 @@ diskPartition(Device *dev, Disk *d)
since we don't always know who called us */
dialog_clear_norefresh(), clear();
- while (chunking) {
- /* Set up the chunk array */
- record_chunks(d);
+ /* Set up the chunk array */
+ record_chunks(d);
+ while (chunking) {
/* Now print our overall state */
print_chunks(d);
print_command_summary();
@@ -259,6 +259,7 @@ diskPartition(Device *dev, Disk *d)
if (rv)
d->bios_hd = d->bios_sect = d->bios_cyl = 1;
variable_set2(DISK_PARTITIONED, "yes");
+ record_chunks(d);
clear();
break;
@@ -309,6 +310,7 @@ diskPartition(Device *dev, Disk *d)
Create_Chunk(d, chunk_info[current_chunk]->offset, size, partitiontype, subtype,
(chunk_info[current_chunk]->flags & CHUNK_ALIGN));
variable_set2(DISK_PARTITIONED, "yes");
+ record_chunks(d);
}
}
clear();
@@ -322,6 +324,7 @@ diskPartition(Device *dev, Disk *d)
else {
Delete_Chunk(d, chunk_info[current_chunk]);
variable_set2(DISK_PARTITIONED, "yes");
+ record_chunks(d);
}
break;
@@ -361,14 +364,16 @@ diskPartition(Device *dev, Disk *d)
dev->private = d;
variable_unset(DISK_PARTITIONED);
variable_unset(DISK_LABELLED);
+ record_chunks(d);
clear();
break;
case 'W':
if (!msgYesNo("WARNING: This should only be used for modifying an\n"
- "EXISTING installation - DO NOT USE this option if you\n"
- "are installing FreeBSD for the first time! This is not\n"
- "an option for use during the standard install.\n\n"
+ "EXISTING installation - If you are installing FreeBSD\n"
+ "for the first time then you should simply hit 'Q' now."
+ "Your changes will be committed in one batch at the end\n"
+ "of this section and do not have to be written now.\n\n"
"Are you absolutely sure you want to do this now?")) {
variable_set2(DISK_PARTITIONED, "yes");
@@ -396,6 +401,7 @@ diskPartition(Device *dev, Disk *d)
refresh();
slice_wizard(d);
variable_set2(DISK_PARTITIONED, "yes");
+ record_chunks(d);
}
else
msg = "Wise choice!";
diff --git a/usr.sbin/sysinstall/help/partition.hlp b/usr.sbin/sysinstall/help/partition.hlp
index cbce9a4..e0cc43b 100644
--- a/usr.sbin/sysinstall/help/partition.hlp
+++ b/usr.sbin/sysinstall/help/partition.hlp
@@ -21,13 +21,6 @@ without initializing it. If you want it initialized, use the (T)oggle
command to flip the Newfs flag. When Newfs is set to "Y", the
filesystem in question will be ERASED and rebuilt from scratch!
-NOTE: The (W)rite option is HIGHLY DANGEROUS and should NOT BE USED if
-you're installing a new system! It's only for use in resurrecting
-or changing an existing system, and will cause unpredictable things to
-happen if you use it in any other circumstances. Don't do it! Wait
-for the final commit dialog if you're express/novice installing, or
-use the "Commit" menu item if you're custom installing, and do it there.
-
You should use this editor to create at least the following
filesystems:
diff --git a/usr.sbin/sysinstall/help/slice.hlp b/usr.sbin/sysinstall/help/slice.hlp
index 1c1581b..40e4d49 100644
--- a/usr.sbin/sysinstall/help/slice.hlp
+++ b/usr.sbin/sysinstall/help/slice.hlp
@@ -36,13 +36,6 @@ Install menu or use the (W)rite option here! You're working with what
is essentially a copy of the disk label(s), both here and in the Label
Editor.
-NOTE: The (W)rite option is HIGHLY DANGEROUS and should NOT BE USED if
-you're installing a new system! It's only for use in resurrecting
-or changing an existing system, and will cause unpredictable things to
-happen if you use it in any other circumstances. Don't do it! Wait
-for the final commit dialog if you're express/novice installing, or
-use the "Commit" menu item if you're custom installing, and do it there.
-
If you want to use the entire disk for FreeBSD, type `A'. You'll be
asked whether or not you wish to keep the disk (potentially) compatible
with other operating systems, i.e. the information in the FDISK table
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index e787d6f..5b052e4 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: install.c,v 1.125 1996/10/03 08:17:16 jkh Exp $
+ * $Id: install.c,v 1.126 1996/10/03 08:54:37 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -594,6 +594,9 @@ installFixup(dialogMenuItem *self)
if (!file_readable("/kernel")) {
if (file_readable("/kernel.GENERIC")) {
+ /* Snapshot any boot -c changes back to the GENERIC kernel */
+ save_userconfig_to_kernel("/kernel.GENERIC");
+
if (vsystem("cp -p /kernel.GENERIC /kernel")) {
msgConfirm("Unable to link /kernel into place!");
return DITEM_FAILURE;
@@ -607,11 +610,6 @@ installFixup(dialogMenuItem *self)
}
}
-#ifdef notyet
- /* Snapshot any boot -c changes back to the GENERIC kernel */
- save_userconfig_to_kernel("/kernel");
-#endif
-
/* Resurrect /dev after bin distribution screws it up */
if (RunningAsInit) {
msgNotify("Remaking all devices.. Please wait!");
@@ -680,6 +678,10 @@ installFilesystems(dialogMenuItem *self)
extern int MakeDevChunk(Chunk *c, char *n);
Boolean upgrade = FALSE;
+ /* If we've already done this, bail out */
+ if (variable_get(DISK_PREPARED))
+ return DITEM_SUCCESS;
+
str = variable_get(SYSTEM_STATE);
if (!checkLabels(TRUE, &rootdev, &swapdev, &usrdev, &vardev))
@@ -820,6 +822,7 @@ installFilesystems(dialogMenuItem *self)
command_sort();
command_execute();
+ variable_set2(DISK_PREPARED, "yes");
return DITEM_SUCCESS;
}
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index a7154c9..8089ed5 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: sysinstall.h,v 1.78 1996/08/01 10:58:53 jkh Exp $
+ * $Id: sysinstall.h,v 1.79 1996/10/01 12:13:25 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -74,6 +74,7 @@
#define DISK_PARTITIONED "_diskPartitioned"
#define DISK_LABELLED "_diskLabelled"
#define DISK_SELECTED "_diskSelected"
+#define DISK_PREPARED "_diskPrepared"
#define SYSTEM_STATE "_systemState"
#define RUNNING_ON_ROOT "_runningOnRoot"
#define TCP_CONFIGURED "_tcpConfigured"
OpenPOWER on IntegriCloud