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.
This commit is contained in:
Jordan K. Hubbard 1997-02-15 15:40:37 +00:00
parent e33c24a2d2
commit 3937aa2158
6 changed files with 21 additions and 15 deletions

View file

@ -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");

View file

@ -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);
}

View file

@ -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");

View file

@ -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);
}

View file

@ -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");

View file

@ -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);
}