aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2011-06-08 01:11:37 +0200
committerTom Gundersen <teg@jklm.no>2011-06-08 01:11:37 +0200
commit663f5e917994b674d4fbe184ff262f94da11256e (patch)
tree72fafb4d759960bb2b729910b6a84498ceca18ba
parent3ac781f2f188b4e9c698aba7ede6154a64ffc679 (diff)
parent32047175759770ac0b37a1fede68a13e2b4d4fdd (diff)
downloadinitscripts-663f5e917994b674d4fbe184ff262f94da11256e.tar.xz
Merge branch 'snowman'
Conflicts: rc.multi rc.single Trivial conflict, and fixed a bug introduced when I imported the patches in the first place (oops). Signed-off-by: Tom Gundersen <teg@jklm.no>
-rw-r--r--Makefile3
-rw-r--r--bootlog9
-rw-r--r--functions2
-rwxr-xr-xrc.multi6
-rwxr-xr-xrc.single2
5 files changed, 18 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ff7d907..c568b13 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
VER := $(shell git describe)
-DIRS := /etc/rc.d /etc/conf.d /etc/rc.d/functions.d /sbin /etc/bash_completion.d /usr/share/zsh/site-functions
+DIRS := /etc/rc.d /etc/conf.d /etc/rc.d/functions.d /etc/logrotate.d /sbin /etc/bash_completion.d /usr/share/zsh/site-functions
minilogd: minilogd.o
@@ -9,6 +9,7 @@ installdirs:
install: minilogd installdirs
install -m644 -t $(DESTDIR)/etc inittab rc.conf
install -m755 -t $(DESTDIR)/etc rc.local rc.local.shutdown rc.multi rc.shutdown rc.single rc.sysinit
+ install -m644 -t $(DESTDIR)/etc/logrotate.d bootlog
install -m644 -t $(DESTDIR)/etc/rc.d functions
install -m755 -t $(DESTDIR)/etc/rc.d hwclock network netfs
install -m755 -t $(DESTDIR)/sbin minilogd rc.d
diff --git a/bootlog b/bootlog
new file mode 100644
index 0000000..b97af0b
--- /dev/null
+++ b/bootlog
@@ -0,0 +1,9 @@
+/var/log/boot {
+ compress
+ rotate 1
+ size=+1024k
+ notifempty
+ missingok
+ copytruncate
+ noolddir
+}
diff --git a/functions b/functions
index 27e53d0..adf4ea9 100644
--- a/functions
+++ b/functions
@@ -71,7 +71,7 @@ if [[ $USECOLOR =~ yes|YES ]]; then
C_FAIL="\e[1;31m" # failed
C_DONE="${C_MAIN}" # completed
C_BKGD="\e[1;35m" # backgrounded
- C_H1="${$C_MAIN}" # highlight text 1
+ C_H1="${C_MAIN}" # highlight text 1
C_H2="\e[1;36m" # highlight text 2
fi
fi
diff --git a/rc.multi b/rc.multi
index 7af9279..1160ab4 100755
--- a/rc.multi
+++ b/rc.multi
@@ -27,9 +27,11 @@ fi
run_hook multi_end
if [[ -f /run/bootlogd.pid ]]; then
- /bin/touch /var/log/boot
+ touch /var/log/boot
kill $(< /run/bootlogd.pid)
- /bin/rm -f /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
# vim: set ts=2 sw=2 noet:
diff --git a/rc.single b/rc.single
index 91d346b..bb27ddf 100755
--- a/rc.single
+++ b/rc.single
@@ -54,6 +54,8 @@ 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