mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
Silence output from gzip in logrotate()
- system may not have gzip (we're opportunistic) - system may not have the log file (yet) Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+1
-1
@@ -80,7 +80,7 @@ int logrotate(char *file, int num, off_t sz)
|
||||
}
|
||||
|
||||
if (cnt == 2 && fexist(nfile)) {
|
||||
if (systemf("gzip %s", nfile))
|
||||
if (systemf("gzip %s 2>/dev/null", nfile))
|
||||
continue; /* no gzip, probably */
|
||||
|
||||
(void)remove(nfile);
|
||||
|
||||
Reference in New Issue
Block a user