mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
log(fix): do not pipe stdout to /dev/null during crash log rotation
This commit is contained in:
@@ -245,7 +245,7 @@ if [ "${FROM_KUAL}" == "yes" ] ; then
|
||||
fi
|
||||
|
||||
# we keep maximum 100K worth of crash log
|
||||
cat crash.log &> /dev/null | tail -c 100000000 > crash.log.new
|
||||
cat crash.log 2> /dev/null | tail -c 100000000 > crash.log.new
|
||||
mv -f crash.log.new crash.log
|
||||
./reader.lua "$@" >> crash.log 2>&1
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ if awk '$4~/(^|,)ro($|,)/' /proc/mounts | grep ' /mnt/sd ' ; then
|
||||
fi
|
||||
|
||||
# we keep maximum 100K worth of crash log
|
||||
cat crash.log &> /dev/null | tail -c 100000000 > crash.log.new
|
||||
cat crash.log 2> /dev/null | tail -c 100000000 > crash.log.new
|
||||
mv -f crash.log.new crash.log
|
||||
./reader.lua "${args}" >> crash.log 2>&1
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ else
|
||||
fi
|
||||
|
||||
# we keep maximum 100K worth of crash log
|
||||
cat crash.log &> /dev/null | tail -c 100000000 > crash.log.new
|
||||
cat crash.log 2> /dev/null | tail -c 100000000 > crash.log.new
|
||||
mv -f crash.log.new crash.log
|
||||
./reader.lua "$args" >> crash.log 2>&1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user