From 35e9eb2f68fa2ff880980bd777dadd98d396e65d Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Wed, 30 Sep 1998 11:44:29 +0000 Subject: [PATCH] Call gunzip correctly. --- release/sysinstall/system.c | 6 ++++-- usr.sbin/sade/system.c | 6 ++++-- usr.sbin/sysinstall/system.c | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c index 61a27c4ef294..895b6d0dd540 100644 --- a/release/sysinstall/system.c +++ b/release/sysinstall/system.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: system.c,v 1.81 1997/05/27 18:56:03 jkh Exp $ + * $Id: system.c,v 1.82 1997/07/31 11:08:45 jkh Exp $ * * Jordan Hubbard * @@ -51,9 +51,11 @@ handle_intr(int sig) static char * expand(char *fname) { + char *gunzip = RunningAsInit ? "/stand/gunzip" : "/usr/bin/gunzip"; + Mkdir(DOC_TMP_DIR); unlink(DOC_TMP_FILE); - if (!file_readable(fname) || vsystem("gzip -c -d %s > %s", fname, DOC_TMP_FILE)) + if (!file_readable(fname) || vsystem("%s -c %s > %s", gunzip, fname, DOC_TMP_FILE)) return NULL; return DOC_TMP_FILE; } diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c index 61a27c4ef294..895b6d0dd540 100644 --- a/usr.sbin/sade/system.c +++ b/usr.sbin/sade/system.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: system.c,v 1.81 1997/05/27 18:56:03 jkh Exp $ + * $Id: system.c,v 1.82 1997/07/31 11:08:45 jkh Exp $ * * Jordan Hubbard * @@ -51,9 +51,11 @@ handle_intr(int sig) static char * expand(char *fname) { + char *gunzip = RunningAsInit ? "/stand/gunzip" : "/usr/bin/gunzip"; + Mkdir(DOC_TMP_DIR); unlink(DOC_TMP_FILE); - if (!file_readable(fname) || vsystem("gzip -c -d %s > %s", fname, DOC_TMP_FILE)) + if (!file_readable(fname) || vsystem("%s -c %s > %s", gunzip, fname, DOC_TMP_FILE)) return NULL; return DOC_TMP_FILE; } diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c index 61a27c4ef294..895b6d0dd540 100644 --- a/usr.sbin/sysinstall/system.c +++ b/usr.sbin/sysinstall/system.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: system.c,v 1.81 1997/05/27 18:56:03 jkh Exp $ + * $Id: system.c,v 1.82 1997/07/31 11:08:45 jkh Exp $ * * Jordan Hubbard * @@ -51,9 +51,11 @@ handle_intr(int sig) static char * expand(char *fname) { + char *gunzip = RunningAsInit ? "/stand/gunzip" : "/usr/bin/gunzip"; + Mkdir(DOC_TMP_DIR); unlink(DOC_TMP_FILE); - if (!file_readable(fname) || vsystem("gzip -c -d %s > %s", fname, DOC_TMP_FILE)) + if (!file_readable(fname) || vsystem("%s -c %s > %s", gunzip, fname, DOC_TMP_FILE)) return NULL; return DOC_TMP_FILE; }