mirror of
https://github.com/troglobit/finit.git
synced 2026-11-03 13:28:27 +00: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 parent
1edc4356a6
commit
ac17d7f5a7
1 file changed
+1
-1
+1
-1
@@ -80,7 +80,7 @@ int logrotate(char *file, int num, off_t sz)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cnt == 2 && fexist(nfile)) {
|
if (cnt == 2 && fexist(nfile)) {
|
||||||
if (systemf("gzip %s", nfile))
|
if (systemf("gzip %s 2>/dev/null", nfile))
|
||||||
continue; /* no gzip, probably */
|
continue; /* no gzip, probably */
|
||||||
|
|
||||||
(void)remove(nfile);
|
(void)remove(nfile);
|
||||||
|
|||||||
Reference in new issue
Block a user