]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
scripts: Add a logrotate file for /var/log/boot.log
authorHans de Goede <hdegoede@redhat.com>
Sun, 13 Oct 2019 14:37:29 +0000 (16:37 +0200)
committerHans de Goede <hdegoede@redhat.com>
Sun, 13 Oct 2019 14:46:42 +0000 (16:46 +0200)
Since plymouth concatenates boot logs one after the other in
/var/log/boot.log, causing it to grow endlessly. we need to logrotrate it.

Fixes #31

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
scripts/Makefile.am
scripts/bootlog [new file with mode: 0644]

index ba492df53806712f318e09d2736a434e0e00839f..d41687474315458dfbca0fc2b4e3423408982c7c 100644 (file)
@@ -6,9 +6,13 @@ initrdscript_SCRIPTS = plymouth-update-initrd plymouth-generate-initrd plymouth-
 sbinscriptsdir = $(sbindir)
 sbinscripts_SCRIPTS = plymouth-set-default-theme
 
+bootlogdir = $(sysconfdir)/logrotate.d
+bootlog_DATA = bootlog
+
 EXTRA_DIST= plymouth-update-initrd                                             \
            plymouth-generate-initrd.in                                        \
            plymouth-populate-initrd.in                                        \
-           plymouth-set-default-theme.in                                     \
+           plymouth-set-default-theme.in                                      \
            $(noinst_SCRIPTS)                                                  \
+           bootlog                                                            \
            default.cfg
diff --git a/scripts/bootlog b/scripts/bootlog
new file mode 100644 (file)
index 0000000..9be1a64
--- /dev/null
@@ -0,0 +1,8 @@
+/var/log/boot.log
+{
+    missingok
+    daily
+    copytruncate
+    rotate 7
+    notifempty
+}