mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
WIO: code cleanup
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
159cab272a
commit
48aae162c6
@@ -21,7 +21,7 @@
|
|||||||
# #
|
# #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Version: 2020/06/01 13:29:23
|
# Version: 2020/08/04 21:12:23
|
||||||
#
|
#
|
||||||
# This wio.cgi is based on the code from the IPCop WIO Addon
|
# This wio.cgi is based on the code from the IPCop WIO Addon
|
||||||
# and is extremly adapted to work with IPFire.
|
# and is extremly adapted to work with IPFire.
|
||||||
@@ -1152,7 +1152,7 @@ close (FILE);
|
|||||||
|
|
||||||
foreach (@ddns) {
|
foreach (@ddns) {
|
||||||
chomp;
|
chomp;
|
||||||
|
|
||||||
@temp = split (/\,/, $_);
|
@temp = split (/\,/, $_);
|
||||||
|
|
||||||
if ( $temp[7] eq "on" ) {
|
if ( $temp[7] eq "on" ) {
|
||||||
@@ -1161,7 +1161,7 @@ close (FILE);
|
|||||||
else {
|
else {
|
||||||
$bgcolor = "blue";
|
$bgcolor = "blue";
|
||||||
}
|
}
|
||||||
|
|
||||||
print"<font color='$bgcolor'>$temp[1].$temp[2]</font>";
|
print"<font color='$bgcolor'>$temp[1].$temp[2]</font>";
|
||||||
if ( $iddyndns++ ne (@ddns-1) ) { print"<br />\n"; }
|
if ( $iddyndns++ ne (@ddns-1) ) { print"<br />\n"; }
|
||||||
}
|
}
|
||||||
@@ -1334,7 +1334,7 @@ foreach $key (keys %ovpnconfighash) {
|
|||||||
if (-e "/var/run/$ovpnconfighash{$key}[1]n2n.pid") {
|
if (-e "/var/run/$ovpnconfighash{$key}[1]n2n.pid") {
|
||||||
my ( @output, @tustate ) = '';
|
my ( @output, @tustate ) = '';
|
||||||
my $tport = $ovpnconfighash{$key}[22];
|
my $tport = $ovpnconfighash{$key}[22];
|
||||||
my $tnet = new Net::Telnet ( Timeout=>5, Errmode=>'return', Port=>$tport);
|
my $tnet = new Net::Telnet ( Timeout=>5, Errmode=>'return', Port=>$tport);
|
||||||
if ($tport ne '') {
|
if ($tport ne '') {
|
||||||
$tnet->open('127.0.0.1');
|
$tnet->open('127.0.0.1');
|
||||||
@output = $tnet->cmd(String => 'state', Prompt => '/(END.*\n|ERROR:.*\n)/');
|
@output = $tnet->cmd(String => 'state', Prompt => '/(END.*\n|ERROR:.*\n)/');
|
||||||
@@ -1535,7 +1535,6 @@ my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.');
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print"<td align='center' height='20'><img src='$imgstatic/$devs_img[$in]' alt='$Lang::tr{$devs_alt[$in]}' title='$Lang::tr{$devs_alt[$in]}' /></td>";
|
print"<td align='center' height='20'><img src='$imgstatic/$devs_img[$in]' alt='$Lang::tr{$devs_alt[$in]}' title='$Lang::tr{$devs_alt[$in]}' /></td>";
|
||||||
|
|
||||||
}
|
}
|
||||||
last SWITCH;
|
last SWITCH;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user