diff options
author | jkh <jkh@FreeBSD.org> | 1996-04-28 20:54:11 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-04-28 20:54:11 +0000 |
commit | 590017a61ca58be6918c7060127977c51861c36b (patch) | |
tree | 4feb68ad24dca3ea106d8e7eaa8949c9e16a1f31 /usr.sbin/sade/system.c | |
parent | c17cc2e1bedeb94384f0251f46ed703860b946d6 (diff) | |
download | FreeBSD-src-590017a61ca58be6918c7060127977c51861c36b.zip FreeBSD-src-590017a61ca58be6918c7060127977c51861c36b.tar.gz |
Add a new -fake argument to make sysinstall not actually change things while
I'm testing it.
Diffstat (limited to 'usr.sbin/sade/system.c')
-rw-r--r-- | usr.sbin/sade/system.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c index adb89e8..ff448eb 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.54 1996/04/28 01:07:27 jkh Exp $ + * $Id: system.c,v 1.55 1996/04/28 03:27:26 jkh Exp $ * * Jordan Hubbard * @@ -109,7 +109,12 @@ systemExecute(char *command) foo.c_cc[VERASE] = '\010'; tcsetattr(0, TCSANOW, &foo); } - status = system(command); + if (!Fake) + status = system(command); + else { + status = 0; + msgDebug("systemExecute: Faked execution of `%s'\n", command); + } DialogActive = TRUE; return status; } @@ -199,6 +204,10 @@ vsystem(char *fmt, ...) va_end(args); omask = sigblock(sigmask(SIGCHLD)); + if (Fake) { + msgDebug("vsystem: Faked execution of `%s'\n", cmd); + return 0; + } if (isDebug()) msgDebug("Executing command `%s'\n", cmd); pid = fork(); |