X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Fwakeonlan.cgi;h=8ea4ae0355733020572b4efa7ce9e1096cefbba3;hb=c703cd4ce52abcbd52a7de62c02e20087794af00;hp=9f9c316555a9eaa5f245af0ec90f0dd963e3e52b;hpb=0e199a227f8fb9475d8ba5439e889c497cf45669;p=people%2Fpmueller%2Fipfire-2.x.git diff --git a/html/cgi-bin/wakeonlan.cgi b/html/cgi-bin/wakeonlan.cgi index 9f9c316555..8ea4ae0355 100644 --- a/html/cgi-bin/wakeonlan.cgi +++ b/html/cgi-bin/wakeonlan.cgi @@ -1,12 +1,23 @@ #!/usr/bin/perl -# -# IPFire WakeOnLan-AddOn CGI -# This code is based on the wol-gui addon -# for ipcop written by weizen_42. -# http://www.ban-solms.de/t/IPCop-wolgui.html -# -# This code is distributed under the terms of the GPL -# +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### use strict; @@ -37,6 +48,11 @@ my @wol_devices = (); our $datafile = "/var/ipfire/wakeonlan/clients.conf"; &ReadConfig; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + my %netsettings = (); &General::readhash("${General::swroot}/ethernet/settings", \%netsettings); my %cgiparams = (); @@ -155,7 +171,7 @@ if ( $cgiparams{'ACTION'} eq 'wakeup' ) undef %cgiparams; - system("/usr/local/sbin/launch-ether-wake $mac $iface"); + system("/usr/local/bin/launch-ether-wake $mac $iface"); # make a box with info, 'refresh' to normal screen after 5 seconds if ( $refresh eq 'yes' ) @@ -298,11 +314,11 @@ for $i ( 0 .. $#wol_devices ) } elsif ( $i % 2) { - print ""; + print ""; } else { - print ""; + print ""; } print <