Adding default hook to truncate log files.

This commit is contained in:
Daniel Baumann 2012-12-16 23:58:54 +01:00
parent 43434c2f6a
commit 5b11bd1a06
2 changed files with 13 additions and 2 deletions

View File

@ -635,7 +635,8 @@ Set_defaults ()
remote-adjtime-configuration \
disable-kexec-tools \
remove-backup-files \
remove-temporary-files}"
remove-temporary-files \
truncate-log-files}"
;;
kubuntu)
@ -652,7 +653,8 @@ Set_defaults ()
remove-adjtime-configuration \
disable-kexec-tools \
remove-backup-files \
remove-temporary-files}"
remove-temporary-files \
truncate-log-files}"
;;
esac

View File

@ -0,0 +1,9 @@
#!/bin/sh
set -e
# Truncate log files
for _FILE in $(find /var/log/ -type f)
do
: > ${_FILE}
done