Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/distrib/utils/sysinst/Attic/util.c,v rcsdiff: /ftp/cvs/cvsroot/src/distrib/utils/sysinst/Attic/util.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.67 retrieving revision 1.67.2.9 diff -u -p -r1.67 -r1.67.2.9 --- src/distrib/utils/sysinst/Attic/util.c 2002/04/05 00:12:14 1.67 +++ src/distrib/utils/sysinst/Attic/util.c 2003/02/10 06:05:11 1.67.2.9 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.67 2002/04/05 00:12:14 ad Exp $ */ +/* $NetBSD: util.c,v 1.67.2.9 2003/02/10 06:05:11 jmc Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -252,14 +252,6 @@ get_via_cdrom() { char tmpdir[STRSIZE]; - /* - * Fill in final default path, similar to ftp path - * because we expect the CDROM structure to be the - * same as the ftp site. - */ - strncat(cdrom_dir, machine, STRSIZE - strlen(cdrom_dir)); - strncat(cdrom_dir, ftp_prefix, STRSIZE - strlen(cdrom_dir)); - /* Get CD-rom device name and path within CD-rom */ process_menu(MENU_cdromsource); @@ -440,7 +432,7 @@ ask_verbose_dist() if (verbose < 0) { msg_display(MSG_verboseextract); - process_menu(MENU_noyes); + process_menu(MENU_extract); verbose = yesno; wclear(stdscr); wrefresh(stdscr); @@ -470,8 +462,15 @@ extract_file(path) target_chdir_or_die("/"); /* now extract set files files into "./". */ - tarexit = run_prog(RUN_DISPLAY, NULL, - "pax -zr%spe -f %s", verbose ? "v" : "", path); + if (verbose==1) + tarexit = run_prog(RUN_DISPLAY, NULL, + "progress -zf %s pax -rpe -O", path); + else if (verbose==2) + tarexit = run_prog(RUN_DISPLAY, NULL, + "pax -zrvpe -f %s -O", path); + else + tarexit = run_prog(RUN_DISPLAY, NULL, + "pax -zrpe -f %s -O", path); /* Check tarexit for errors and give warning. */ if (tarexit) { @@ -622,7 +621,7 @@ cleanup_dist(name) } } else { current->next = malloc(sizeof(struct filelist)); - if (head == NULL) { + if (current->next == NULL) { fprintf(stderr, "out of memory\n"); exit(1); } @@ -944,7 +943,7 @@ static void timezone_sig(int sig) { set_timezone_select(NULL); - alarm(1); + alarm(60); } /* @@ -1068,17 +1067,28 @@ set_crypt_type(void) msg_display(MSG_choose_crypt); process_menu(MENU_crypttype); fn = strdup(target_expand("/etc/passwd.conf")); - rename(fn, target_expand("/etc/passwd.conf.pre-sysinst")); - if (!yesno) { + switch (yesno) { + case 0: + break; + case 1: /* DES */ + rename(fn, target_expand("/etc/passwd.conf.pre-sysinst")); + pwc = fopen(fn, "w"); + fprintf(pwc, + "default:\n" + " localcipher = old\n" + " ypcipher = old\n"); + fclose(pwc); + break; + case 2: /* MD5 */ + rename(fn, target_expand("/etc/passwd.conf.pre-sysinst")); pwc = fopen(fn, "w"); - fprintf(pwc, "default:\n" " localcipher = md5\n" " ypcipher = md5\n"); - fclose(pwc); + break; } free(fn);