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

pull/2287/head
Qingping Hou 8 years ago
parent ca14b32204
commit 0ed95406a4

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

Loading…
Cancel
Save