tazpanel rev 66

hardware.cgi: Kernel modules have now it own page (more to come)
author Christophe Lincoln <pankso@slitaz.org>
date Tue Apr 12 02:40:59 2011 +0200 (2011-04-12)
parents e873f2b155dd
children 95dc2475f4ae
files boot.cgi hardware.cgi
line diff
     1.1 --- a/boot.cgi	Tue Apr 12 00:24:11 2011 +0200
     1.2 +++ b/boot.cgi	Tue Apr 12 02:40:59 2011 +0200
     1.3 @@ -146,11 +146,8 @@
     1.4  		`gettext "Everything that appends before user login."` 
     1.5  	</p>
     1.6  </div>
     1.7 -
     1.8  <div>
     1.9  	<a class="button" href="$SCRIPT_NAME?daemons">Manage daemons</a>
    1.10 -	
    1.11 -	
    1.12  </div>
    1.13  
    1.14  <h3>`gettext "Configuration files"`</h3>
     2.1 --- a/hardware.cgi	Tue Apr 12 00:24:11 2011 +0200
     2.2 +++ b/hardware.cgi	Tue Apr 12 02:40:59 2011 +0200
     2.3 @@ -27,27 +27,16 @@
     2.4  case "$QUERY_STRING" in
     2.5  	print*)
     2.6  		echo "TODO" ;;
     2.7 -	*)
     2.8 -		#
     2.9 -		# Default to summary with mounted filesystem, loaded modules
    2.10 -		#
    2.11 +	modules|modinfo=*)
    2.12 +		query_string_parser
    2.13  		xhtml_header
    2.14 -		debug_info
    2.15  		cat << EOT
    2.16  <div id="wrapper">
    2.17 -	<h2>`gettext "Drivers &amp; Devices"`</h2>
    2.18 -	<p>`gettext "Manage your computer hardware`</p>
    2.19 +	<h2>`gettext "Kernel modules"`</h2>
    2.20 +	<p>`gettext "Manage and get info about the Linux kernel modules`</p>
    2.21  </div>
    2.22  EOT
    2.23 -		echo '<pre>'
    2.24 -			fdisk -l | fgrep Disk
    2.25 -		echo '</pre>'
    2.26 -		echo '<h3>Filesystem usage statistics</h3>'
    2.27 -		echo '<pre>'
    2.28 -			df -h | grep ^/dev
    2.29 -		echo '</pre>'
    2.30 -		echo '<h3>Loaded kernel modules</h3>'
    2.31 -		# Request may be modinfo output
    2.32 +		# Request may be modinfo output that we want in the page itself
    2.33  		case "$QUERY_STRING" in
    2.34  			modinfo=*)
    2.35  				mod=${QUERY_STRING#modinfo=}
    2.36 @@ -80,7 +69,29 @@
    2.37  		</tr>
    2.38  EOT
    2.39  		done
    2.40 -		table_end
    2.41 +		table_end ;;
    2.42 +	*)
    2.43 +		#
    2.44 +		# Default to summary with mounted filesystem, loaded modules
    2.45 +		#
    2.46 +		xhtml_header
    2.47 +		debug_info
    2.48 +		cat << EOT
    2.49 +<div id="wrapper">
    2.50 +	<h2>`gettext "Drivers &amp; Devices"`</h2>
    2.51 +	<p>`gettext "Manage your computer hardware`</p>
    2.52 +</div>
    2.53 +<div>
    2.54 +	<a class="button" href="$SCRIPT_NAME?modules">Kernel modules</a>
    2.55 +</div>
    2.56 +EOT
    2.57 +		echo '<h3>Filesystem usage statistics</h3>'
    2.58 +		echo '<pre>'
    2.59 +			fdisk -l | fgrep Disk
    2.60 +		echo '</pre>'
    2.61 +		echo '<pre>'
    2.62 +			df -h | grep ^/dev
    2.63 +		echo '</pre>'		
    2.64  		echo '<h3>lspci</h3>'
    2.65  		echo '<pre>'
    2.66  			lspci -k