Author: pebender
Date: Mon Sep 1 10:54:28 2008
New Revision: 3686
Modified:
trunk/gar-minimyth/html/minimyth/document-changelog.txt
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/srv/www/cgi-bin/mm_webpage.pm
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/srv/www/cgi-bin/software.cgi
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/srv/www/cgi-bin/status.cgi
Log:
- Coverted CGI scripts from sh to perl.
Modified: trunk/gar-minimyth/html/minimyth/document-changelog.txt
==============================================================================
--- trunk/gar-minimyth/html/minimyth/document-changelog.txt (original)
+++ trunk/gar-minimyth/html/minimyth/document-changelog.txt Mon Sep 1
10:54:28 2008
@@ -1,7 +1,7 @@
MiniMyth Changelog
--------------------------------------------------------------------------------
-Changes since 57 (2008-08-31):
+Changes since 57 (2008-09-01):
Current MythTV versions
MythTV 0.21: version 0.21.0, release-0-21-fixes branch svn 18207.
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/srv/www/cgi-bin/mm_webpage.pm
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/srv/www/cgi-bin/mm_webpage.pm
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/srv/www/cgi-bin/mm_webpage.pm
Mon Sep 1 10:54:28 2008
@@ -35,7 +35,7 @@
}
my $page_host = Sys::Hostname::hostname();
- my $page_date = qx(/bin/date +'%Y-%m-%d %H:%M:%S %Z');
+ my $page_date = qx(/bin/date +'%Y-%m-%d %H:%M:%S %Z'); chomp
$page_date;
my $mm_version = $minimyth->var_get('MM_VERSION');
my @page = ();
@@ -78,10 +78,7 @@
push(@page, q( </div>));
push(@page, q( <div class="middle">));
push(@page, qq( <div class="heading">MiniMyth Frontend
$title</div>));
- foreach (@{$middle})
- {
- push(@page, ' ' . $_);
- }
+ push(@page, @{$middle});
push(@page, q( </div>));
push(@page, q( <div class="footer">));
push(@page, q( <hr />));
@@ -96,7 +93,7 @@
push(@page, q( alt="Valid CSS!" height="31"
width="88" /></a>));
push(@page, q( </div>));
push(@page, q( <div class="version">));
- push(@page, q( Last Updated on 2008-08-31));
+ push(@page, q( Last Updated on 2008-09-01));
push(@page, q( <br />));
push(@page, q(
< mailto : webmaster at minimyth dot org >));
push(@page, q( </div>));
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/srv/www/cgi-bin/software.cgi
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/srv/www/cgi-bin/software.cgi
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/srv/www/cgi-bin/software.cgi
Mon Sep 1 10:54:28 2008
@@ -52,10 +52,10 @@
foreach my $type (@type_name)
{
push(@middle, q( <li>));
- push(@middle, qq( $type_header{$type}));
+ push(@middle, qq( $type_header{$type}));
if (-d "/srv/www/software/$type/versions")
{
- push(@middle, q( <ul>));
+ push(@middle, q( <ul>));
if (opendir(SOFTWAREDIR, "/srv/www/software/$type/versions"))
{
foreach my $software (grep((! /^\./) && (! /^minimyth$/) && (!
/^minimyth.conf.mk$/), (readdir(SOFTWAREDIR))))
Modified:
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/srv/www/cgi-bin/status.cgi
==============================================================================
---
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/srv/www/cgi-bin/status.cgi
(original)
+++
trunk/gar-minimyth/script/meta/minimyth/files/source/rootfs/srv/www/cgi-bin/status.cgi
Mon Sep 1 10:54:28 2008
@@ -21,17 +21,28 @@
while (<FILE>)
{
chomp;
- s/(\-[1-9][0-9]\.[0-9] C)/<span class="temp_cool">$1<\/span>/;
- s/(\-[1-9]\.[0-9] C)/<span class="temp_cool">$1<\/span>/;
- s/(\+[1-9]\.[0-9] C)/<span class="temp_cool">$1<\/span>/;
- s/(\+[1-4][0-9]\.[0-9] C)/<span class="temp_cool">$1<\/span>/;
- s/(\+[5-6][0-9]\.[0-9] C)/<span class="temp_warm">$1<\/span>/;
- s/(\+[7-9][0-9]\.[0-9] C)/<span class="temp_hot">$1<\/span>/;
+ if (/(: *)([-+][0-9]+\.[0-9]+)( C)/)
+ {
+ my $class;
+ if ($2 < 50) { $class = 'temp_cool'; }
+ elsif ($2 < 70) { $class = 'temp_warm'; }
+ else { $class = 'temp_hot'; }
+
+ s/(: *)([-+][0-9]+\.[0-9]+)( C)/$1<span
class="$class">$2$3<\/span>/;
+ }
push(@status_sensors_body, $_);
}
close(FILE);
}
}
+while (($#status_sensors_body >= 0) && ($status_sensors_body[0] eq ''))
+{
+ shift(@status_sensors_body);
+}
+while (($#status_sensors_body >= 0) &&
($status_sensors_body[$#status_sensors_body] eq ''))
+{
+ pop(@status_sensors_body);
+}
my $status_loads_head = q(Loads (output of file "/proc/loadavg"));
my @status_loads_body = ();
@@ -47,25 +58,27 @@
close(FILE);
}
}
+while (($#status_loads_body >= 0) && ($status_loads_body[0] eq ''))
+{
+ shift(@status_loads_body);
+}
+while (($#status_loads_body >= 0) &&
($status_loads_body[$#status_loads_body] eq ''))
+{
+ pop(@status_loads_body);
+}
my @middle = ();
push(@middle, q(<div class="section">));
push(@middle, qq( <div class="heading">$status_sensors_head</div>));
push(@middle, q( <div class="status">));
-foreach (@status_sensors_body)
-{
- push(@middle, qq($_));
-}
+push(@middle, @status_sensors_body);
push(@middle, q( </div>));
push(@middle, q(</div>));
push(@middle, q(<div class="section">));
push(@middle, qq( <div class="heading">$status_loads_head</div>));
push(@middle, q( <div class="status">));
-foreach (@status_loads_body)
-{
- push(@middle, qq($_));
-}
+push(@middle, @status_loads_body);
push(@middle, q( </div>));
push(@middle, q(</div>));
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---