]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Let dhcpcd rotate the logfile itself.
authorRoy Marples <roy@marples.name>
Wed, 18 Mar 2015 12:11:40 +0000 (12:11 +0000)
committerRoy Marples <roy@marples.name>
Wed, 18 Mar 2015 12:11:40 +0000 (12:11 +0000)
common.c
defs.h
dhcpcd.8.in
dhcpcd.conf.5.in

index 62c7f73830e1638e79cb1cd8e0348ee43ff21a80..0b144dc8d9eb8111be692fef63fd9bb47214a928 100644 (file)
--- 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 20801fc37a64e2d437eb9ddf6d1bd29a0ac204e1..69546505d205665aaf93f82b4cbff8143f7e6dbe 100644 (file)
--- 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"
index 270e913bc6cd6a37d7afd5a1edc006d8f377fa6a..a67626a491ed5bb116393fd2bdd231f056969ac3 100644 (file)
@@ -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
index f5bd7a677ee2a8276df2cda71980e8306f79b799..a0e927e0b0ce712c6fc39736abc2580d957bd5aa 100644 (file)
@@ -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