From c97113d14f96c09d523fd1b51ffff9266720f2f7 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Sun, 28 Apr 1996 20:54:11 +0000 Subject: Add a new -fake argument to make sysinstall not actually change things while I'm testing it. --- usr.sbin/sysinstall/system.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'usr.sbin/sysinstall/system.c') diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c index adb89e8ccb69..ff448ebc0914 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.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(); -- cgit v1.2.3