# HG changeset patch # User Christophe Lincoln # Date 1261480213 -3600 # Node ID c9296cbaaafa9f3c90464f381cd4b318a071b9fc # Parent c9e9d25f04a37dd4f7c20800467a1dd5229a4894 rcS: log execution time for slitaz boot scripts diff -r c9e9d25f04a3 -r c9296cbaaafa etc/init.d/rcS --- a/etc/init.d/rcS Tue Dec 22 12:07:43 2009 +0100 +++ b/etc/init.d/rcS Tue Dec 22 12:10:13 2009 +0100 @@ -8,6 +8,9 @@ . /etc/init.d/rc.functions . /etc/rcS.conf +# Boot time. +bootdate=`date +%s` + if [ "$1" != "logged" ]; then # logged echo "Processing /etc/init.d/rcS..." @@ -244,4 +247,9 @@ echo -e "\033[1m$MESSAGE\033[0m" fi +# Display and log boot time. +time=$((`date +%s` - $bootdate)) +echo $time > /var/log/boot-time +echo "SliTaz boot time: ${time}s" + fi # logged