rendered paste body#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
depend() {
need localmount
}
start() {
ebegin "Enabling Ram Log"
mount tmpfs /var/log -t tmpfs -o size=2m
/etc/init.d/metalog restart
eend ${?}
}
stop() {
ebegin "Disabling Ram Log"
mkdir /tmp/logs
cp -r /var/log/* /tmp/logs
cd /tmp/logs
find ./ -type f -exec sh -c "cat {} >> /var/log/{}"
umount /var/log
/etc/init.d/metalog restart
eend ${?}
}