diff options
author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1998-09-08 10:42:26 +0000 |
---|---|---|
committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1998-09-08 10:42:26 +0000 |
commit | 8c26c30381cd31f8b8a0b92a0ee80bc6f0971c71 (patch) | |
tree | ba284fb846973305c66d386ac78ffc1fa90bc1ed /usr.sbin/pkg_install/lib | |
parent | 9df3bd9208cae32c6cd5b04ad35eacf612812635 (diff) | |
download | src-8c26c30381cd31f8b8a0b92a0ee80bc6f0971c71.tar.gz src-8c26c30381cd31f8b8a0b92a0ee80bc6f0971c71.zip |
o Set paths internally for pkg_add for tools we might want to invoke.
o Fix bogus suffix handling.
o Tell user when an FTP url is being xferred rather than being silent.
This sort of violates "the unix way" but it stops people from whacking
^C when they think it's hung, too. Sometimes visual indication of
success is important. Doesn't spit out anything if not on a TTY.
Notes
Notes:
svn path=/head/; revision=38942
Diffstat (limited to 'usr.sbin/pkg_install/lib')
-rw-r--r-- | usr.sbin/pkg_install/lib/file.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c index ef52dcaa6133..1cf82cc3f6f1 100644 --- a/usr.sbin/pkg_install/lib/file.c +++ b/usr.sbin/pkg_install/lib/file.c @@ -1,6 +1,6 @@ #ifndef lint static const char rcsid[] = - "$Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp $"; + "$Id: file.c,v 1.30 1997/10/18 05:54:17 jkh Exp $"; #endif /* @@ -247,14 +247,12 @@ fileGetURL(char *base, char *spec) gethostname(me, HOSTNAME_MAX); snprintf(pword, HOSTNAME_MAX + 40, "%s@%s", pw->pw_name, me); } - if (Verbose) - printf("Trying to fetch %s.\n", fname); ftp = ftpGetURL(fname, uname, pword, &status); if (ftp) { + if (isatty(0) || Verbose) + printf("Fetching %s...", fname), fflush(stdout); pen[0] = '\0'; if ((rp = make_playpen(pen, 0)) != NULL) { - if (Verbose) - printf("Extracting from FTP connection into %s\n", pen); tpid = fork(); if (!tpid) { dup2(fileno(ftp), 0); @@ -273,6 +271,8 @@ fileGetURL(char *base, char *spec) else printf("Error: Unable to construct a new playpen for FTP!\n"); fclose(ftp); + if (rp && (isatty(0) || Verbose)) + printf(" Done.\n"); } else printf("Error: FTP Unable to get %s: %s\n", |