aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sade
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1997-02-15 15:40:37 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1997-02-15 15:40:37 +0000
commit3937aa2158cd43a5a4d15ab16613127fa7a3570a (patch)
treefcb13d872c68db05ebc8122d0be849335349f844 /usr.sbin/sade
parente33c24a2d2f974508d1362c1673aa1322b0f9706 (diff)
downloadsrc-3937aa2158cd43a5a4d15ab16613127fa7a3570a.tar.gz
src-3937aa2158cd43a5a4d15ab16613127fa7a3570a.zip
Make configSysconfig() less chatty.
Now that this is becoming (dare I even say it?) more useful for post-configuration, no longer leave sysinstall.debug files around by default. Only do this if environment variable SYSINSTALL_DEBUG is set.
Notes
Notes: svn path=/head/; revision=22757
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r--usr.sbin/sade/config.c7
-rw-r--r--usr.sbin/sade/termcap.c5
2 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c
index dc601f4a72d4..fafd78c5aa37 100644
--- a/usr.sbin/sade/config.c
+++ b/usr.sbin/sade/config.c
@@ -389,11 +389,10 @@ configSysconfig(char *config)
}
/* Now write it all back out again */
- msgNotify("Writing configuration changes to %s file..", config);
- if (Fake) {
- msgDebug("Writing %s out to debugging screen..\n", config);
+ if (isDebug())
+ msgDebug("Writing configuration changes to %s file..", config);
+ if (Fake)
fp = fdopen(DebugFD, "w");
- }
else {
(void)vsystem("cp %s %s.previous", config, config);
fp = fopen(config, "w");
diff --git a/usr.sbin/sade/termcap.c b/usr.sbin/sade/termcap.c
index a72c0a4a3fb3..992cb60ee607 100644
--- a/usr.sbin/sade/termcap.c
+++ b/usr.sbin/sade/termcap.c
@@ -32,7 +32,10 @@ set_termcap(void)
stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay);
if (getpid() != 1) {
- DebugFD = open("sysinstall.debug", O_WRONLY|O_CREAT|O_TRUNC, 0644);
+ if (getenv("SYSINSTALL_DEBUG"))
+ DebugFD = open("sysinstall.debug", O_WRONLY|O_CREAT|O_TRUNC, 0644);
+ else
+ DebugFD = -1;
if (DebugFD < 0)
DebugFD = open("/dev/null", O_RDWR, 0);
}