slitaz-boot-scripts rev 279

rcS: rotate /var/log/boot.log
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 14 19:10:12 2012 +0100 (2012-02-14)
parents b4cefa566cf7
children 23be5da0f57c
files etc/init.d/rcS
line diff
     1.1 --- a/etc/init.d/rcS	Thu Jan 26 09:24:31 2012 +0100
     1.2 +++ b/etc/init.d/rcS	Tue Feb 14 19:10:12 2012 +0100
     1.3 @@ -295,6 +295,11 @@
     1.4  mv -f /dev/shm/boot.log /boot.log
     1.5  umount /dev/shm
     1.6  script -aqc '/etc/init.d/rcS readwrite' /boot.log
     1.7 +last=.9
     1.8 +for i in .8 .7 .6 .5 .4 .3 .2 .1 .0 '' ; do
     1.9 +	mv -f /var/log/boot.log$i /var/log/boot.log$last 2>/dev/null
    1.10 +	last=$i
    1.11 +done
    1.12  mv -f /boot.log /var/log/boot.log
    1.13  script -aqc '/etc/init.d/rcS logged' /var/log/boot.log
    1.14  ;;