Adding default hook to truncate log files.

This commit is contained in:
Daniel Baumann 2012-12-16 23:58:54 +01:00
parent 7caf9ed19f
commit 4c68f85487
2 changed files with 13 additions and 2 deletions

View File

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