mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
e33c24a2d2
commit
3937aa2158
6 changed files with 21 additions and 15 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue