Deleted Added
full compact
install.c (17368) install.c (17404)
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 *
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 $
7 * $Id: install.c,v 1.117 1996/07/31 09:29:28 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. */
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();
204 dialog_clear_norefresh();
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();
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();
269 end_dialog();
270 DialogActive = FALSE;
271 if (!directory_exists("/tmp"))
272 (void)symlink("/mnt2/tmp", "/tmp");
273 if (!directory_exists("/var/tmp/vi.recover")) {
274 if (DITEM_STATUS(Mkdir("/var/tmp/vi.recover")) != DITEM_SUCCESS) {
275 msgConfirm("Warning: Was unable to create a /var/tmp/vi.recover directory.\n"
276 "vi will kvetch and moan about it as a result but should still\n"

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

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

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

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

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

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

--- 460 unchanged lines hidden ---