diff options
author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-04-28 20:54:11 +0000 |
---|---|---|
committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-04-28 20:54:11 +0000 |
commit | c97113d14f96c09d523fd1b51ffff9266720f2f7 (patch) | |
tree | 4feb68ad24dca3ea106d8e7eaa8949c9e16a1f31 /usr.sbin/sysinstall/system.c | |
parent | 9591b63489d25baba69f9923bac30213adfc6fe3 (diff) | |
download | src-c97113d14f96c09d523fd1b51ffff9266720f2f7.tar.gz src-c97113d14f96c09d523fd1b51ffff9266720f2f7.zip |
Add a new -fake argument to make sysinstall not actually change things while
I'm testing it.
Notes
Notes:
svn path=/head/; revision=15439
Diffstat (limited to 'usr.sbin/sysinstall/system.c')
-rw-r--r-- | usr.sbin/sysinstall/system.c | 13 |
1 files changed, 11 insertions, 2 deletions
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(); |