log(fix): do not pipe stdout to /dev/null during crash log rotation

This commit is contained in:
Qingping Hou
2016-10-16 01:16:28 -07:00
parent ca14b32204
commit 0ed95406a4
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

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