From e9f99808ead0c9c48b776811d27a18b3a0170144 Mon Sep 17 00:00:00 2001 From: Stephen Soltesz Date: Fri, 1 Apr 2011 17:16:38 -0400 Subject: [PATCH 1/1] Add an entry for /etc/logrotate.d/btmp to rotate the /var/log/btmp file, which can grow unbounded from failed ssh logins and fill the root fs of a node. --- config.planetlab/bootstrapfs.post | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/config.planetlab/bootstrapfs.post b/config.planetlab/bootstrapfs.post index 9ceb582f..79d54fe3 100644 --- a/config.planetlab/bootstrapfs.post +++ b/config.planetlab/bootstrapfs.post @@ -52,6 +52,19 @@ if echo ${vdir} | grep -q x86_64 ; then chroot ${vdir} rpm -qa --qf '%{name}.%{arch}\n' | grep 'i[36]86$' | xargs chroot ${vdir} rpm -e fi +# Add a logrotate script for btmp, which logs failed ssh logins, which can +# grow unbounded on public plnodes and fill the root fs. +cat < ${vdir}/etc/logrotate.d/btmp +/var/log/btmp { + weekly + minsize 1M + create 0600 root utmp + rotate 2 + compress + notifempty +} +EOF + # NOTE: This is added to relieve one site's Cisco router configuration that # fails to recognize the host once the arping is sent out. # NOTE: this is pretty fragile, and fails on fedora 10 that as of today (oct. 20 2009) -- 2.43.0