diff options
author | jkh <jkh@FreeBSD.org> | 1997-03-11 09:29:42 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1997-03-11 09:29:42 +0000 |
commit | 266d7fba02761d8720cb17d2c28b06e8c5df5204 (patch) | |
tree | f044d80f7113a0bb3f6fd902493be0d4e00053ce /release | |
parent | af5e57db7f46089295d1a3d8956538a98ad8497e (diff) | |
download | FreeBSD-src-266d7fba02761d8720cb17d2c28b06e8c5df5204.zip FreeBSD-src-266d7fba02761d8720cb17d2c28b06e8c5df5204.tar.gz |
Merge all my sysinstall changes over to the 2.1 branch.
I just have this feeling... :)
Diffstat (limited to 'release')
-rw-r--r-- | release/sysinstall/help/upgrade.hlp | 6 | ||||
-rw-r--r-- | release/sysinstall/installUpgrade.c | 4 | ||||
-rw-r--r-- | release/sysinstall/package.c | 26 |
3 files changed, 12 insertions, 24 deletions
diff --git a/release/sysinstall/help/upgrade.hlp b/release/sysinstall/help/upgrade.hlp index 48965f0..e0673bb 100644 --- a/release/sysinstall/help/upgrade.hlp +++ b/release/sysinstall/help/upgrade.hlp @@ -1,11 +1,11 @@ -Welcome to the 2.x.x -> 3.0 upgrade procedure! +Welcome to the 2.1.x (or 2.0.5) -> 2.1.7 upgrade procedure! It must first be said that this upgrade DOES NOT take a particularly sophisticated approach to the upgrade problem, it being more a question of providing what seemed "good enough" at the time. A truly polished upgrade that deals properly with the broad spectrum of -installed 2.x.x systems would be nice to have, but until that gets -written what you get is this - the brute-force approach! +installed 2.0.5 / 2.1.x systems would be nice to have, but until that +gets written what you get is this - the brute-force approach! What this upgrade will attempt to do is best summarized thusly: diff --git a/release/sysinstall/installUpgrade.c b/release/sysinstall/installUpgrade.c index 76711d0..8535e3a 100644 --- a/release/sysinstall/installUpgrade.c +++ b/release/sysinstall/installUpgrade.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: installUpgrade.c,v 1.44 1997/02/07 04:26:16 jkh Exp $ + * $Id: installUpgrade.c,v 1.45 1997/03/07 16:39:17 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -339,7 +339,7 @@ media: } msgConfirm("OK! At this stage, we've resurrected all the /etc files\n" - "and moved each new copy over to /etc/update/<file> in case you want\n" + "and moved each new copy over to /etc/upgrade/<file> in case you want\n" "to see what the new versions look like. If you want to wander over\n" "to the Emergency Holographic Shell [ALT-F4] at this point to do\n" "that, now would be a good time. When you're ready to reboot into\n" diff --git a/release/sysinstall/package.c b/release/sysinstall/package.c index d6759ff..4a6afee 100644 --- a/release/sysinstall/package.c +++ b/release/sysinstall/package.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: package.c,v 1.58 1997/02/14 23:00:01 jkh Exp $ + * $Id: package.c,v 1.59 1997/03/08 12:57:48 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -68,15 +68,6 @@ package_exists(char *name) return !status; } -/* SIGPIPE handler */ -static Boolean sigpipe_caught = FALSE; - -static void -catch_pipe(int sig) -{ - sigpipe_caught = TRUE; -} - /* Extract a package based on a namespec and a media device */ int package_extract(Device *dev, char *name, Boolean depended) @@ -116,14 +107,13 @@ package_extract(Device *dev, char *name, Boolean depended) int i, tot, pfd[2]; pid_t pid; - signal(SIGPIPE, catch_pipe); msgNotify("Adding %s%s\nfrom %s", path, depended ? " (as a dependency)" : "", dev->name); pipe(pfd); pid = fork(); if (!pid) { dup2(pfd[0], 0); close(pfd[0]); dup2(DebugFD, 1); - dup2(DebugFD, 2); + close(2); close(pfd[1]); i = execl("/usr/sbin/pkg_add", "/usr/sbin/pkg_add", "-", 0); if (isDebug()) @@ -138,7 +128,7 @@ package_extract(Device *dev, char *name, Boolean depended) tot = 0; (void)gettimeofday(&start, (struct timezone *)0); - while (!sigpipe_caught && (i = fread(buf, 1, BUFSIZ, fp)) > 0) { + while ((i = fread(buf, 1, BUFSIZ, fp)) > 0) { int seconds; tot += i; @@ -160,20 +150,19 @@ package_extract(Device *dev, char *name, Boolean depended) } close(pfd[1]); fclose(fp); - if (sigpipe_caught || i == -1) - msgDebug("%s while trying to install the %s package.\n", - sigpipe_caught ? "SIGPIPE" : "I/O error", name); + if (i == -1) + msgDebug("I/O error while reading in the %s package.\n", name); else msgInfo("Package %s read successfully - waiting for pkg_add", name); refresh(); i = waitpid(pid, &tot, 0); - if (sigpipe_caught || i < 0 || WEXITSTATUS(tot)) { + if (i < 0 || WEXITSTATUS(tot)) { if (variable_get(VAR_NO_CONFIRM)) msgNotify("Add of package %s aborted, error code %d -\n" "Please check the debug screen for more info.", name, WEXITSTATUS(tot)); else msgConfirm("Add of package %s aborted, error code %d -\n" - "Please check the debug screen for more info.", name, WEXITSTATUS(tot)); + "Please check the debug screen for more info.", name, WEXITSTATUS(tot)); } else msgNotify("Package %s was added successfully", name); @@ -183,7 +172,6 @@ package_extract(Device *dev, char *name, Boolean depended) sleep(1); restorescr(w); - sigpipe_caught = FALSE; } } else { |