Просмотр исходного кода

Remove log2ram log on startup.

Since the normal log2ram log isn't in /var/log, it won't be handled by
logrotate, so it should be removed on startup to prevent it from
growing indefinitely.

We should also figure out some way to let it be processed by
logrotate, but that'd be really tricky to do well.  Maybe just kludge
it by removing all but the last 10 lines if the file is greater than
SIZE?
pull/9/head
Nick Daly 8 лет назад
Родитель
Сommit
8e009f29f2
1 измененных файлов: 1 добавлений и 0 удалений
  1. +1
    -0
      log2ram

+ 1
- 0
log2ram Просмотреть файл

@@ -33,6 +33,7 @@ syncFromDisk () {
case "$1" in
start)
[ -d $HDD_LOG ] || mkdir $HDD_LOG
rm $LOG2RAM_LOG
mount --bind $RAM_LOG $HDD_LOG
mount --make-private $HDD_LOG
mount -t tmpfs -o nosuid,noexec,nodev,mode=0755,size=$SIZE log2ram $RAM_LOG


Загрузка…
Отмена
Сохранить