diff options
-rw-r--r-- | release/sysinstall/config.c | 7 | ||||
-rw-r--r-- | release/sysinstall/termcap.c | 5 | ||||
-rw-r--r-- | usr.sbin/sade/config.c | 7 | ||||
-rw-r--r-- | usr.sbin/sade/termcap.c | 5 | ||||
-rw-r--r-- | usr.sbin/sysinstall/config.c | 7 | ||||
-rw-r--r-- | usr.sbin/sysinstall/termcap.c | 5 |
6 files changed, 21 insertions, 15 deletions
diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index dc601f4..fafd78c 100644 --- a/release/sysinstall/config.c +++ b/release/sysinstall/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/release/sysinstall/termcap.c b/release/sysinstall/termcap.c index a72c0a4..992cb60 100644 --- a/release/sysinstall/termcap.c +++ b/release/sysinstall/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); } diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index dc601f4..fafd78c 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 a72c0a4..992cb60 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); } diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index dc601f4..fafd78c 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/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/sysinstall/termcap.c b/usr.sbin/sysinstall/termcap.c index a72c0a4..992cb60 100644 --- a/usr.sbin/sysinstall/termcap.c +++ b/usr.sbin/sysinstall/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); } |