From: Roy Marples Date: Wed, 18 Mar 2015 12:11:40 +0000 (+0000) Subject: Let dhcpcd rotate the logfile itself. X-Git-Tag: v6.8.0~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf2dcc16d20788f92f8ccd20adc9d727211c7ee9;p=thirdparty%2Fdhcpcd.git Let dhcpcd rotate the logfile itself. --- diff --git a/common.c b/common.c index 62c7f738..0b144dc8 100644 --- a/common.c +++ b/common.c @@ -150,7 +150,7 @@ logger_open(struct dhcpcd_ctx *ctx) { if (ctx->logfile) { - int f = O_CREAT | O_APPEND; + int f = O_CREAT | O_APPEND | O_TRUNC; #ifdef O_CLOEXEC f |= O_CLOEXEC; diff --git a/defs.h b/defs.h index 20801fc3..69546505 100644 --- a/defs.h +++ b/defs.h @@ -28,7 +28,7 @@ #define CONFIG_H #define PACKAGE "dhcpcd" -#define VERSION "6.7.99.5" +#define VERSION "6.7.99.6" #ifndef CONFIG # define CONFIG SYSCONFDIR "/" PACKAGE ".conf" diff --git a/dhcpcd.8.in b/dhcpcd.8.in index 270e913b..a67626a4 100644 --- a/dhcpcd.8.in +++ b/dhcpcd.8.in @@ -326,7 +326,7 @@ rather than .Xr syslog 3 . The .Ar logfile -is reopened when +is truncated when opened and is reopened when .Nm receives the .Dv SIGUSR2 diff --git a/dhcpcd.conf.5.in b/dhcpcd.conf.5.in index f5bd7a67..a0e927e0 100644 --- a/dhcpcd.conf.5.in +++ b/dhcpcd.conf.5.in @@ -382,7 +382,7 @@ rather than .Xr syslog 3 . The .Ar logfile -is reopened when +is truncated when opened and is reopened when .Nm dhcpcd receives the .Dv SIGUSR2