summaryrefslogtreecommitdiff
path: root/rc.single
diff options
context:
space:
mode:
authorEric Bélanger <snowmaniscool@gmail.com>2011-06-05 23:23:57 -0400
committerTom Gundersen <teg@jklm.no>2011-06-08 00:57:57 +0200
commitd0b7d600da518778b2a5d7c08785ea328fbaf2e7 (patch)
tree5bd73ed83118bdd652273e4b971e30f1ca4b6d51 /rc.single
parent36f31f686374ae3f2311f8674e0a91022d502576 (diff)
Clean up ANSI codes from /var/log/boot
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'rc.single')
-rwxr-xr-xrc.single10
1 files changed, 7 insertions, 3 deletions
diff --git a/rc.single b/rc.single
index c754eb1..bb27ddf 100755
--- a/rc.single
+++ b/rc.single
@@ -50,9 +50,13 @@ if [[ $RUNLEVEL = 1 ]]; then
exec init -t1 S
fi
-touch /var/log/boot
-kill $(< /run/bootlogd.pid)
-rm /run/bootlogd.pid
+if [[ -f /run/bootlogd.pid ]]; then
+ touch /var/log/boot
+ kill $(< /run/bootlogd.pid)
+ rm -f /run/bootlogd.pid
+ sed -i -r -e 's/\^\[\[[0-9]?;?[0-9]?[0-9]?;?[0-9]?[0-9]?[ms]//g' \
+ -e 's/\^\[(\[151|%)G//g' /var/log/boot
+fi
# End of file
# vim: set ts=2 sw=2 noet: