tazpanel rev 130

boot.cgi: show boot logs
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Apr 16 13:22:34 2011 +0200 (2011-04-16)
parents a613e1727e0c
children f296d55ef283
files boot.cgi
line diff
     1.1 --- a/boot.cgi	Sat Apr 16 11:19:16 2011 +0200
     1.2 +++ b/boot.cgi	Sat Apr 16 13:22:34 2011 +0200
     1.3 @@ -18,6 +18,23 @@
     1.4  #
     1.5  
     1.6  case " $(GET) " in
     1.7 +	*\ log\ *)
     1.8 +		xhtml_header
     1.9 +		
    1.10 +		cat << EOT
    1.11 +<div id="wrapper">
    1.12 +	<h2>`gettext "Boot log files"`</h2>
    1.13 +</div>
    1.14 +	<h3>`gettext "kernel messages"`</h3>
    1.15 +	<pre>
    1.16 +$(cat /var/log/dmesg.log)
    1.17 +	</pre>
    1.18 +	<h3>`gettext "boot scripts"`</h3>
    1.19 +	<pre>
    1.20 +$(sed 's/\[^Gm]*.//g' < /var/log/boot.log)
    1.21 +	</pre>
    1.22 +EOT
    1.23 +		;;
    1.24  	*\ daemons\ *)
    1.25  		#
    1.26  		# Everything until user login
    1.27 @@ -144,6 +161,8 @@
    1.28  	</p>
    1.29  </div>
    1.30  <div>
    1.31 +	<a class="button" href="$SCRIPT_NAME?log">
    1.32 +		<img src="$IMAGES/edit.png" />`gettext "Boot logs"`</a>
    1.33  	<a class="button" href="$SCRIPT_NAME?daemons">
    1.34  		<img src="$IMAGES/recharge.png" />`gettext "Manage daemons"`</a>
    1.35  </div>