Explorar el Código

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 hace 8 años
padre
commit
8e009f29f2
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. +1
    -0
      log2ram

+ 1
- 0
log2ram Ver fichero

@@ -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


Cargando…
Cancelar
Guardar