slitaz-boot-scripts rev 187
rcS: log execution time for slitaz boot scripts
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Dec 22 12:10:13 2009 +0100 (2009-12-22) |
parents | c9e9d25f04a3 |
children | 7512d6d48538 |
files | etc/init.d/rcS |
line diff
1.1 --- a/etc/init.d/rcS Tue Dec 22 12:07:43 2009 +0100 1.2 +++ b/etc/init.d/rcS Tue Dec 22 12:10:13 2009 +0100 1.3 @@ -8,6 +8,9 @@ 1.4 . /etc/init.d/rc.functions 1.5 . /etc/rcS.conf 1.6 1.7 +# Boot time. 1.8 +bootdate=`date +%s` 1.9 + 1.10 if [ "$1" != "logged" ]; then # logged 1.11 1.12 echo "Processing /etc/init.d/rcS..." 1.13 @@ -244,4 +247,9 @@ 1.14 echo -e "\033[1m$MESSAGE\033[0m" 1.15 fi 1.16 1.17 +# Display and log boot time. 1.18 +time=$((`date +%s` - $bootdate)) 1.19 +echo $time > /var/log/boot-time 1.20 +echo "SliTaz boot time: ${time}s" 1.21 + 1.22 fi # logged