my %color = ();
my %mainsettings = ();
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
-&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
+&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
my %netsettings = ();
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
unless( &General::validmac($cgiparams{'CLIENT_MAC'}) )
{
- $errormessage = $Lang::tr{'invalid mac address'};
+ $errormessage = $Lang::tr{'invalid mac address'};
goto ADDEXIT;
}
unless( &General::validmac($cgiparams{'CLIENT_MAC'}) )
{
- $errormessage = $Lang::tr{'invalid mac address'};
+ $errormessage = $Lang::tr{'invalid mac address'};
goto UPDATEEXIT;
}
undef %cgiparams;
- system("/usr/local/bin/launch-ether-wake $mac $iface");
+ &General::system("/usr/sbin/etherwake", "-i", "$iface", "$mac");
# make a box with info, 'refresh' to normal screen after 5 seconds
if ( $refresh eq 'yes' )
;
print "<option value='green' $selected{'CLIENT_IFACE'}{'green'}>$Lang::tr{'green'}</option>";
-if (&haveBlueNet())
+if (&haveBlueNet())
{
print "<option value='blue' $selected{'CLIENT_IFACE'}{'blue'}>$Lang::tr{'blue'}</option>";
}
-if (&haveOrangeNet())
+if (&haveOrangeNet())
{
print "<option value='orange' $selected{'CLIENT_IFACE'}{'orange'}>$Lang::tr{'orange'}</option>";
}
END
;
-if ( ($cgiparams{'ACTION'} eq 'edit') || ($cgiparams{'ACTION'} eq 'update') )
+if ( ($cgiparams{'ACTION'} eq 'edit') || ($cgiparams{'ACTION'} eq 'update') )
{
print "<input type='hidden' name='ID' value='$cgiparams{'ID'}' />\n";
print "<input type='hidden' name='ACTION' value='update' />";
my $wol_iface = $wol_devices[$i]{'IFace'};
my $wol_txt = &Header::cleanhtml($wol_devices[$i]{'Comment'});
- if ( (($cgiparams{'ACTION'} eq 'edit') || ($cgiparams{'ACTION'} eq 'update')) && ($i == $cgiparams{'ID'}) )
+ if ( (($cgiparams{'ACTION'} eq 'edit') || ($cgiparams{'ACTION'} eq 'update')) && ($i == $cgiparams{'ID'}) )
{
print "<tr>";
$col="bgcolor='${Header::colouryellow}'";
}
- elsif ( $i % 2)
+ elsif ( $i % 2)
{
print "<tr>";
$col="bgcolor='$color{'color20'}'";
<td align='center' $col>
END
;
- if ( (($wol_iface eq 'blue') && ! &haveBlueNet())
+ if ( (($wol_iface eq 'blue') && ! &haveBlueNet())
|| (($wol_iface eq 'orange') && ! &haveOrangeNet()) )
{
# configured IFace (momentarily) not available -> now wakeup button/image
{
# datafileformat:
# ID,MAC,IFACE,,Comment
- #
+ #
my @tmpfile = ();
if ( open(FILE, "$datafile") )
{
unless(&General::validmac($wol_devices[$i]{'MAC'})) { next; }
unshift (@tmp_clients, uc($wol_devices[$i]{'MAC'}).",$wol_devices[$i]{'IFace'},,$wol_devices[$i]{'Comment'}");
}
-
+
# sort tmp_clients on MAC
@tmp_clients = sort ( @tmp_clients );
open(FILE, ">$datafile") or die 'hosts datafile error';
my $count = 0;
- foreach $line (@tmp_clients)
+ foreach $line (@tmp_clients)
{
print FILE "$count,$line\n";
$count++;