From e3e0a7a43302624fc9a907742c0dbed735a4f86d Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Wed, 2 Oct 1996 08:25:11 +0000 Subject: [PATCH] Fixes and a place-holder for future work. --- release/sysinstall/ftp_strat.c | 9 +++++++-- release/sysinstall/install.c | 19 +++++++++++++------ release/sysinstall/media.c | 4 ++-- usr.sbin/sade/install.c | 19 +++++++++++++------ usr.sbin/sysinstall/install.c | 19 +++++++++++++------ usr.sbin/sysinstall/media.c | 4 ++-- 6 files changed, 50 insertions(+), 24 deletions(-) diff --git a/release/sysinstall/ftp_strat.c b/release/sysinstall/ftp_strat.c index 5b5662980e5a..a2f43512419a 100644 --- a/release/sysinstall/ftp_strat.c +++ b/release/sysinstall/ftp_strat.c @@ -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: ftp_strat.c,v 1.25 1996/10/02 02:02:16 jkh Exp $ + * $Id: ftp_strat.c,v 1.26 1996/10/02 02:28:21 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -162,11 +162,15 @@ mediaGetFTP(Device *dev, char *file, Boolean probe) lastRequest = file; while ((fd = FtpGet(ftp, fp)) < 0) { /* If a hard fail, try to "bounce" the ftp server to clear it */ - if (fd == IO_ERROR) { + if (fd == IO_ERROR) { + char *cp = variable_get(VAR_FTP_PATH); + dev->shutdown(dev); /* If we can't re-initialize, just forget it */ if (!dev->init(dev)) return IO_ERROR; + else + variable_set2(VAR_FTP_PATH, cp); } else if (probe) return EOF; @@ -221,6 +225,7 @@ mediaShutdownFTP(Device *dev) FtpClose(ftp); ftp = NULL; } + variable_unset(VAR_FTP_PATH); /* (*netdev->shutdown)(netdev); */ ftpInitted = FALSE; } diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c index f17abf3a9bb3..f1c45623c468 100644 --- a/release/sysinstall/install.c +++ b/release/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.120 1996/10/01 04:56:32 jkh Exp $ + * $Id: install.c,v 1.121 1996/10/01 14:08:15 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -50,6 +50,7 @@ #include static void create_termcap(void); +static void save_userconfig_to_kernel(char *); #define TERMCAP_FILE "/usr/share/misc/termcap" @@ -402,6 +403,7 @@ installNovice(dialogMenuItem *self) "scroll-lock feature. You can also chose \"No\" at the next\n" "prompt and go back into the installation menus to try and retry\n" "whichever operations have failed."); + mediaDevice->shutdown(mediaDevice); return i | DITEM_RECREATE; } @@ -564,10 +566,10 @@ installCommit(dialogMenuItem *self) } i = distExtractAll(self); - if (DITEM_STATUS(i) == DITEM_FAILURE) - (void)installFixup(self); - else + if (DITEM_STATUS(i) != DITEM_FAILURE) i = installFixup(self); + else if (!(Dists & DIST_BIN)) + (void)installFixup(self); /* Don't print this if we're express or novice installing - they have their own error reporting */ if (strcmp(str, "express") && strcmp(str, "novice")) { @@ -619,8 +621,8 @@ installFixup(dialogMenuItem *self) } } - /* Snapshot the dset changes back */ - vsystem("/sbin/dset -v -k /kernel"); + /* Snapshot any boot -c changes back to the GENERIC kernel */ + save_userconfig_to_kernel("/kernel"); /* Resurrect /dev after bin distribution screws it up */ if (RunningAsInit) { @@ -907,3 +909,8 @@ create_termcap(void) } } +static void +save_userconfig_to_kernel(char *kern) +{ + /* place-holder for now */ +} diff --git a/release/sysinstall/media.c b/release/sysinstall/media.c index 33ac2146d5a5..b59a41596ee5 100644 --- a/release/sysinstall/media.c +++ b/release/sysinstall/media.c @@ -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: media.c,v 1.56 1996/10/02 00:41:40 jkh Exp $ + * $Id: media.c,v 1.57 1996/10/02 02:02:18 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -283,7 +283,7 @@ mediaSetFTP(dialogMenuItem *self) "A URL looks like this: ftp:///\n" "Where is relative to the anonymous ftp directory or the\n" "home directory of the user being logged in as."); - if (!cp || !*cp) + if (!cp || !*cp || !strcmp(cp, "ftp://")) return DITEM_FAILURE | what; } if (strncmp("ftp://", cp, 6)) { diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index f17abf3a9bb3..f1c45623c468 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/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.120 1996/10/01 04:56:32 jkh Exp $ + * $Id: install.c,v 1.121 1996/10/01 14:08:15 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -50,6 +50,7 @@ #include static void create_termcap(void); +static void save_userconfig_to_kernel(char *); #define TERMCAP_FILE "/usr/share/misc/termcap" @@ -402,6 +403,7 @@ installNovice(dialogMenuItem *self) "scroll-lock feature. You can also chose \"No\" at the next\n" "prompt and go back into the installation menus to try and retry\n" "whichever operations have failed."); + mediaDevice->shutdown(mediaDevice); return i | DITEM_RECREATE; } @@ -564,10 +566,10 @@ installCommit(dialogMenuItem *self) } i = distExtractAll(self); - if (DITEM_STATUS(i) == DITEM_FAILURE) - (void)installFixup(self); - else + if (DITEM_STATUS(i) != DITEM_FAILURE) i = installFixup(self); + else if (!(Dists & DIST_BIN)) + (void)installFixup(self); /* Don't print this if we're express or novice installing - they have their own error reporting */ if (strcmp(str, "express") && strcmp(str, "novice")) { @@ -619,8 +621,8 @@ installFixup(dialogMenuItem *self) } } - /* Snapshot the dset changes back */ - vsystem("/sbin/dset -v -k /kernel"); + /* Snapshot any boot -c changes back to the GENERIC kernel */ + save_userconfig_to_kernel("/kernel"); /* Resurrect /dev after bin distribution screws it up */ if (RunningAsInit) { @@ -907,3 +909,8 @@ create_termcap(void) } } +static void +save_userconfig_to_kernel(char *kern) +{ + /* place-holder for now */ +} diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index f17abf3a9bb3..f1c45623c468 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.120 1996/10/01 04:56:32 jkh Exp $ + * $Id: install.c,v 1.121 1996/10/01 14:08:15 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -50,6 +50,7 @@ #include static void create_termcap(void); +static void save_userconfig_to_kernel(char *); #define TERMCAP_FILE "/usr/share/misc/termcap" @@ -402,6 +403,7 @@ installNovice(dialogMenuItem *self) "scroll-lock feature. You can also chose \"No\" at the next\n" "prompt and go back into the installation menus to try and retry\n" "whichever operations have failed."); + mediaDevice->shutdown(mediaDevice); return i | DITEM_RECREATE; } @@ -564,10 +566,10 @@ installCommit(dialogMenuItem *self) } i = distExtractAll(self); - if (DITEM_STATUS(i) == DITEM_FAILURE) - (void)installFixup(self); - else + if (DITEM_STATUS(i) != DITEM_FAILURE) i = installFixup(self); + else if (!(Dists & DIST_BIN)) + (void)installFixup(self); /* Don't print this if we're express or novice installing - they have their own error reporting */ if (strcmp(str, "express") && strcmp(str, "novice")) { @@ -619,8 +621,8 @@ installFixup(dialogMenuItem *self) } } - /* Snapshot the dset changes back */ - vsystem("/sbin/dset -v -k /kernel"); + /* Snapshot any boot -c changes back to the GENERIC kernel */ + save_userconfig_to_kernel("/kernel"); /* Resurrect /dev after bin distribution screws it up */ if (RunningAsInit) { @@ -907,3 +909,8 @@ create_termcap(void) } } +static void +save_userconfig_to_kernel(char *kern) +{ + /* place-holder for now */ +} diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c index 33ac2146d5a5..b59a41596ee5 100644 --- a/usr.sbin/sysinstall/media.c +++ b/usr.sbin/sysinstall/media.c @@ -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: media.c,v 1.56 1996/10/02 00:41:40 jkh Exp $ + * $Id: media.c,v 1.57 1996/10/02 02:02:18 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -283,7 +283,7 @@ mediaSetFTP(dialogMenuItem *self) "A URL looks like this: ftp:///\n" "Where is relative to the anonymous ftp directory or the\n" "home directory of the user being logged in as."); - if (!cp || !*cp) + if (!cp || !*cp || !strcmp(cp, "ftp://")) return DITEM_FAILURE | what; } if (strncmp("ftp://", cp, 6)) {