From 339d0a10258a8cf862c84b5f26cdd042dfeca8c2 Mon Sep 17 00:00:00 2001 From: "Kurt J. Bosch" Date: Fri, 24 Jun 2011 16:56:36 +0200 Subject: rc.multi/rc.single: Merge duplicated bootlogd stop code into a function --- functions | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'functions') diff --git a/functions b/functions index 0c34cb9..b64f78b 100644 --- a/functions +++ b/functions @@ -430,6 +430,15 @@ mount_all() { stat_done } +bootlogd_stop() { + [[ -f /run/bootlogd.pid ]] || return 0 + 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 +} + ############################### # Custom hooks in initscripts # ############################### -- cgit v1.2.3