/[packages]/updates/1/webmin/current/SOURCES/webmin-1.510-fix-status-in-init.patch
ViewVC logotype

Annotation of /updates/1/webmin/current/SOURCES/webmin-1.510-fix-status-in-init.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 101464 - (hide annotations) (download)
Wed Jun 1 19:01:05 2011 UTC (12 years, 10 months ago) by schedbot
File size: 1695 byte(s)
SILENT: branch release 1
1 ennael 60039 diff -u init.orig/edit_action.cgi init/edit_action.cgi
2     --- init.orig/edit_action.cgi 2010-04-16 22:53:02.000000000 +0200
3     +++ init/edit_action.cgi 2010-04-17 08:58:03.000000000 +0200
4     @@ -127,7 +127,7 @@
5    
6     # Show if action is currently running
7     if ($hasarg{'status'} && $config{'status_check'}) {
8     - $out = &backquote_command("$file status</dev/null 2>/dev/null");
9     + $out = &backquote_command("$file status 2>/dev/null >/dev/null ; echo \$?");
10     if ($out =~ /not\s+running/i) {
11     $status = "<font color=#ff0000>$text{'no'}</font>";
12     }
13     @@ -137,6 +137,12 @@
14     elsif ($out =~ /stopped/i) {
15     $status = "<font color=#ff0000>$text{'no'}</font>";
16     }
17     + elsif ($out =~ /^0\s*$/) {
18     + $status = $text{'yes'};
19     + }
20     + elsif ($out =~ /^\d+\s*$/) {
21     + $status = "<font color=#ff0000>$text{'no'}</font>";
22     + }
23     else {
24     $status = "<i>$text{'edit_unknown'}</i>";
25     }
26     diff -u init.orig/index.cgi init/index.cgi
27     --- init.orig/index.cgi 2010-04-16 22:53:02.000000000 +0200
28     +++ init/index.cgi 2010-04-17 08:51:13.000000000 +0200
29     @@ -156,7 +156,7 @@
30     if ($config{'status_check'} == 2) {
31     if ($actsl[$i] =~ /^0/) {
32     local $out = $has{'status'} ?
33     - `$actsf[$i] status` : '';
34     + `$actsf[$i] status >/dev/null ; echo \$?` : '';
35     if ($out =~ /not\s+running/i) {
36     push(@cols,
37     "<font color=#ff0000>".
38     @@ -169,6 +169,14 @@
39     push(@cols,
40     "<font color=#ff0000>".
41     "$text{'no'}</font>");
42     + }
43     + elsif ($out =~ /^0\s*$/) {
44     + push(@cols,"$text{'yes'}");
45     + }
46     + elsif ($out =~ /^\d+\s*$/) {
47     + push(@cols,
48     + "<font color=#ff0000>".
49     + "$text{'no'}</font>");
50     }
51     else {
52     push(@cols, undef);

  ViewVC Help
Powered by ViewVC 1.1.30