X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Fupnp.cgi;h=07dfa2677c970e49a9be6ae9ffe5f209fb26616c;hb=87bee81c561562c61324769313414fcff5704176;hp=3749ade60182e07b4ac651bfeb28474e1645a3cd;hpb=13211b2167853704be93a1c6bb7a12a1159973c4;p=people%2Fpmueller%2Fipfire-2.x.git diff --git a/html/cgi-bin/upnp.cgi b/html/cgi-bin/upnp.cgi index 3749ade601..07dfa2677c 100644 --- a/html/cgi-bin/upnp.cgi +++ b/html/cgi-bin/upnp.cgi @@ -1,16 +1,28 @@ #!/usr/bin/perl -# -# IPFire CGIs -# -# This code is distributed under the terms of the GPL -# -# (c) The IPFire Team -# +############################################################################### +# # +# 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; # enable only the following on debugging purpose -use warnings; -use CGI::Carp 'fatalsToBrowser'; +#use warnings; +#use CGI::Carp 'fatalsToBrowser'; require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; @@ -70,7 +82,7 @@ if ($upnpsettings{'ACTION'} eq $Lang::tr{'save'}) debug_mode = $upnpsettings{'DEBUGMODE'} insert_forward_rules = $upnpsettings{'FORWARDRULES'} forward_chain_name = FORWARD -prerouting_chain_name = PORTFW +prerouting_chain_name = UPNPFW upstream_bitrate = $upnpsettings{'DOWNSTREAM'} downstream_bitrate = $upnpsettings{'UPSTREAM'} description_document_name = $upnpsettings{'DESCRIPTION'} @@ -121,7 +133,7 @@ print < END ; -if ( $message ne "" ) {print "$message";} +if ( $message ne "" ) {print "$message";} my $lines = 0; my $key = ''; @@ -152,7 +164,7 @@ print <Upstream in KB:
- + END ; @@ -187,9 +199,9 @@ print ""; ############################################################################################################################ sub isrunning - { +{ my $cmd = $_[0]; - my $status = "$Lang::tr{'stopped'}"; + my $status = "$Lang::tr{'stopped'}"; my $pid = ''; my $testcmd = ''; my $exename; @@ -207,9 +219,10 @@ sub isrunning {if (/^Name:\W+(.*)/) {$testcmd = $1; }} close FILE; if ($testcmd =~ /$exename/) - {$status = "$Lang::tr{'running'}";} + {$status = "$Lang::tr{'running'}";} } } return $status; - } +} +