A few sysinst fixes:

* use cd0a rather than cd0[cd] as the CDROM installation device.
	  This fixes problems with platforms that install from iso9660 images
	  encapsulated in a partition, and should not affect platforms that
	  don't.
	* add RUN_PROGRESS to the run_prog() flags for ftp installs.

Okay'ed by David Laight.
This commit is contained in:
sekiya 2003-11-15 12:53:34 +00:00
parent 0b16f71074
commit 1cc0ebce1f
3 changed files with 8 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: defs.h,v 1.105 2003/10/19 20:17:31 dsl Exp $ */ /* $NetBSD: defs.h,v 1.106 2003/11/15 12:53:34 sekiya Exp $ */
/* /*
* Copyright 1997 Piermont Information Systems Inc. * Copyright 1997 Piermont Information Systems Inc.
@ -240,10 +240,10 @@ EXTERN char ftp_proxy[STRSIZE] INIT("");
EXTERN char nfs_host[STRSIZE] INIT(""); EXTERN char nfs_host[STRSIZE] INIT("");
EXTERN char nfs_dir[STRSIZE] INIT(""); EXTERN char nfs_dir[STRSIZE] INIT("");
EXTERN char cdrom_dev[SSTRSIZE] INIT("cd0"); EXTERN char cdrom_dev[SSTRSIZE] INIT("cd0a");
EXTERN char cdrom_dir[STRSIZE] INIT(SYSINST_CDROM_DIR); EXTERN char cdrom_dir[STRSIZE] INIT(SYSINST_CDROM_DIR);
EXTERN char localfs_dev[SSTRSIZE] INIT("sd0"); EXTERN char localfs_dev[SSTRSIZE] INIT("sd0a");
EXTERN char localfs_fs[SSTRSIZE] INIT("ffs"); EXTERN char localfs_fs[SSTRSIZE] INIT("ffs");
EXTERN char localfs_dir[STRSIZE] INIT(""); EXTERN char localfs_dir[STRSIZE] INIT("");

View File

@ -1,4 +1,4 @@
/* $NetBSD: net.c,v 1.97 2003/11/04 16:27:22 perry Exp $ */ /* $NetBSD: net.c,v 1.98 2003/11/15 12:53:34 sekiya Exp $ */
/* /*
* Copyright 1997 Piermont Information Systems Inc. * Copyright 1997 Piermont Information Systems Inc.
@ -799,7 +799,7 @@ get_via_ftp(void)
* unsafe by a strict reading of RFC 1738). * unsafe by a strict reading of RFC 1738).
*/ */
if (strcmp("ftp", ftp_user) == 0 && ftp_pass[0] == 0) if (strcmp("ftp", ftp_user) == 0 && ftp_pass[0] == 0)
ret = run_prog(RUN_DISPLAY, NULL, ret = run_prog(RUN_DISPLAY | RUN_PROGRESS, NULL,
"/usr/bin/ftp -a ftp://%s/%s/%s", "/usr/bin/ftp -a ftp://%s/%s/%s",
ftp_host, ftp_host,
url_encode(ftp_dir_encoded, ftp_dir, url_encode(ftp_dir_encoded, ftp_dir,
@ -807,7 +807,7 @@ get_via_ftp(void)
RFC1738_SAFE_LESS_SHELL_PLUS_SLASH, 1), RFC1738_SAFE_LESS_SHELL_PLUS_SLASH, 1),
filename); filename);
else { else {
ret = run_prog(RUN_DISPLAY, NULL, ret = run_prog(RUN_DISPLAY | RUN_PROGRESS, NULL,
"/usr/bin/ftp ftp://%s:%s@%s/%s/%s", "/usr/bin/ftp ftp://%s:%s@%s/%s/%s",
url_encode(ftp_user_encoded, ftp_user, url_encode(ftp_user_encoded, ftp_user,
sizeof ftp_user_encoded, sizeof ftp_user_encoded,

View File

@ -1,4 +1,4 @@
/* $NetBSD: util.c,v 1.113 2003/10/19 20:45:27 dsl Exp $ */ /* $NetBSD: util.c,v 1.114 2003/11/15 12:53:34 sekiya Exp $ */
/* /*
* Copyright 1997 Piermont Information Systems Inc. * Copyright 1997 Piermont Information Systems Inc.
@ -327,8 +327,7 @@ again:
/* Mount it */ /* Mount it */
for (retries = 5;; --retries) { for (retries = 5;; --retries) {
if (run_prog(retries > 0 ? RUN_SILENT : 0, NULL, if (run_prog(retries > 0 ? RUN_SILENT : 0, NULL,
"/sbin/mount -rt cd9660 /dev/%s%c /mnt2", "/sbin/mount -rt cd9660 /dev/%s /mnt2", cdrom_dev) == 0)
cdrom_dev, 'a' + getrawpartition()) == 0)
break; break;
if (retries > 0) { if (retries > 0) {
sleep(1); sleep(1);