Adding default hook to truncate log files.

This commit is contained in:
Daniel Baumann 2012-12-16 23:58:54 +01:00 committed by Daniel Baumann
parent fae7a1ce27
commit d6a30e84eb
2 changed files with 13 additions and 2 deletions

View File

@ -614,7 +614,8 @@ Set_defaults ()
remote-adjtime-configuration \
disable-kexec-tools \
remove-backup-files \
remove-temporary-files}"
remove-temporary-files \
truncate-log-files}"
;;
kubuntu)
@ -631,7 +632,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