Deleted Added
sdiff udiff text old ( 17368 ) new ( 17404 )
full compact
1/*
2 * The new sysinstall program.
3 *
4 * This is probably the last program in the `sysinstall' line - the next
5 * generation being essentially a complete rewrite.
6 *
7 * $Id: install.c,v 1.116 1996/07/31 06:20:55 jkh Exp $
8 *
9 * Copyright (c) 1995
10 * Jordan Hubbard. All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright

--- 180 unchanged lines hidden (view full) ---

196 "the installation.");
197 return DITEM_FAILURE;
198 }
199 /* If it's labelled, assume it's also partitioned */
200 if (!variable_get(DISK_PARTITIONED))
201 variable_set2(DISK_PARTITIONED, "yes");
202
203 /* If we refuse to proceed, bail. */
204 dialog_clear();
205 if (msgYesNo("Last Chance! Are you SURE you want continue the installation?\n\n"
206 "If you're running this on a disk with data you wish to save\n"
207 "then WE STRONGLY ENCOURAGE YOU TO MAKE PROPER BACKUPS before\n"
208 "proceeding!\n\n"
209 "We can take no responsibility for lost disk contents!"))
210 return DITEM_FAILURE | DITEM_RESTORE;
211
212 if (DITEM_STATUS(diskLabelCommit(NULL)) != DITEM_SUCCESS) {

--- 48 unchanged lines hidden (view full) ---

261 while (1) {
262 msgConfirm("Please insert a writable fixit floppy and press return");
263 if (mount(MOUNT_UFS, "/mnt2", 0, (caddr_t)&args) != -1)
264 break;
265 if (msgYesNo("Unable to mount the fixit floppy - do you want to try again?"))
266 return DITEM_FAILURE;
267 }
268 dialog_clear();
269 dialog_update();
270 end_dialog();
271 DialogActive = FALSE;
272 if (!directory_exists("/tmp"))
273 (void)symlink("/mnt2/tmp", "/tmp");
274 if (!directory_exists("/var/tmp/vi.recover")) {
275 if (DITEM_STATUS(Mkdir("/var/tmp/vi.recover")) != DITEM_SUCCESS) {
276 msgConfirm("Warning: Was unable to create a /var/tmp/vi.recover directory.\n"
277 "vi will kvetch and moan about it as a result but should still\n"

--- 26 unchanged lines hidden (view full) ---

304 return -1;
305 }
306 else
307 (void)waitpid(child, &waitstatus, 0);
308
309 DialogActive = TRUE;
310 clear();
311 dialog_clear();
312 dialog_update();
313 unmount("/mnt2", MNT_FORCE);
314 msgConfirm("Please remove the fixit floppy now.");
315 return DITEM_SUCCESS;
316}
317
318int
319installExpress(dialogMenuItem *self)
320{
321 int i;
322
323 variable_set2(SYSTEM_STATE, "express");
324 if (DITEM_STATUS((i = diskPartitionEditor(self))) == DITEM_FAILURE)
325 return i;
326
327 if (DITEM_STATUS((i = diskLabelEditor(self))) == DITEM_FAILURE)
328 return i;
329
330 if (!Dists) {
331 dialog_clear();
332 if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
333 return DITEM_FAILURE | DITEM_RECREATE;
334 }
335
336 if (!mediaDevice) {
337 dialog_clear();
338 if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
339 return DITEM_FAILURE | DITEM_RECREATE;
340 }
341
342 if (DITEM_STATUS((i = installCommit(self))) == DITEM_SUCCESS) {
343 i |= DITEM_LEAVE_MENU;
344 /* Give user the option of one last configuration spree */
345 installConfigure();

--- 8 unchanged lines hidden (view full) ---

354/* Novice mode installation */
355int
356installNovice(dialogMenuItem *self)
357{
358 int i;
359 extern int cdromMounted;
360
361 variable_set2(SYSTEM_STATE, "novice");
362 dialog_clear();
363 msgConfirm("In the next menu, you will need to set up a DOS-style (\"fdisk\") partitioning\n"
364 "scheme for your hard disk. If you simply wish to devote all disk space\n"
365 "to FreeBSD (overwritting anything else that might be on the disk(s) selected)\n"
366 "then use the (A)ll command to select the default partitioning scheme followed\n"
367 "by a (Q)uit. If you wish to allocate only free space to FreeBSD, move to a\n"
368 "partition marked \"unused\" and use the (C)reate command.");
369
370 if (DITEM_STATUS(diskPartitionEditor(self)) == DITEM_FAILURE)
371 return DITEM_FAILURE;
372
373 dialog_clear();
374 msgConfirm("Next, you need to create BSD partitions inside of the fdisk partition(s)\n"
375 "just created. If you have a reasonable amount of disk space (200MB or more)\n"
376 "and don't have any special requirements, simply use the (A)uto command to\n"
377 "allocate space automatically. If you have more specific needs or just don't\n"
378 "care for the layout chosen by (A)uto, press F1 for more information on\n"
379 "manual layout.");
380
381 if (DITEM_STATUS(diskLabelEditor(self)) == DITEM_FAILURE)
382 return DITEM_FAILURE;
383
384 dialog_clear();
385 msgConfirm("Now it is time to select an installation subset. There are a number of\n"
386 "canned distribution sets, ranging from minimal installation sets to full\n"
387 "X11 developer oriented configurations. You can also select a custom set\n"
388 "of distributions if none of the provided ones are suitable.");
389 while (1) {
390 if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
391 return DITEM_FAILURE | DITEM_RECREATE;
392

--- 27 unchanged lines hidden (view full) ---

420 if (mediaDevice->type != DEVICE_TYPE_FTP && mediaDevice->type != DEVICE_TYPE_NFS) {
421 if (!msgYesNo("Does this system have a network interface card?")) {
422 Device *save = mediaDevice;
423
424 /* This will also set the media device, which we don't want */
425 tcpDeviceSelect();
426 /* so we restore our saved value below */
427 mediaDevice = save;
428 dialog_clear();
429 }
430 }
431
432 if (!msgYesNo("Would you like to configure Samba for connecting NETBUI clients to this\n"
433 "machine? Windows 95, Windows NT and Windows for Workgroups\n"
434 "machines can use NETBUI transport for disk and printer sharing."))
435 configSamba(self);
436

--- 460 unchanged lines hidden ---