]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/pppsetup.cgi
Pakfire CGI korrigiert
[people/teissler/ipfire-2.x.git] / html / cgi-bin / pppsetup.cgi
index 0a3ce09ab597552a65583ea4c05313b6fd06194b..5d2d5d88ff0569aa54cd4c52f263c7f8c09c37bb 100644 (file)
@@ -1,11 +1,23 @@
 #!/usr/bin/perl
-#
-# SmoothWall CGIs
-#
-# This code is distributed under the terms of the GPL
-#
-# (c) The SmoothWall 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 <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
 
 use strict;
 
@@ -204,13 +216,8 @@ ERROR:
        &writesecrets();
 
        &General::log("$Lang::tr{'profile saved'} $pppsettings{'PROFILENAME'}");
-       if ($drivererror) {
-       my $refresh = "<META HTTP-EQUIV='refresh' CONTENT='1; URL=/cgi-bin/upload.cgi'>";
-               my $title = $Lang::tr{'upload'};
-               &Header::openpage($title, 0, $refresh);
-       }
 }
-elsif ($pppsettings{'ACTION'} eq $Lang::tr{'select'})
+if ($pppsettings{'ACTION'} eq $Lang::tr{'select'})
 {
        my $profile = $pppsettings{'PROFILE'};
        %temppppsettings = ();
@@ -306,8 +313,6 @@ $selected{'COMPORT'}{'ttyACM0'} = '';
 $selected{'COMPORT'}{'ttyACM1'} = '';
 $selected{'COMPORT'}{'ttyACM2'} = '';
 $selected{'COMPORT'}{'ttyACM3'} = '';
-$selected{'COMPORT'}{'isdn1'} = '';
-$selected{'COMPORT'}{'isdn2'} = '';
 $selected{'COMPORT'}{$pppsettings{'COMPORT'}} = "selected='selected'";
 
 $selected{'DTERATE'}{'9600'} = '';
@@ -346,9 +351,6 @@ $checked{'SENDCR'}{$pppsettings{'SENDCR'}} = "checked='checked'";
 $checked{'USEDOV'}{'off'} = '';
 $checked{'USEDOV'}{'on'} = '';
 $checked{'USEDOV'}{$pppsettings{'USEDOV'}} = "checked='checked'";
-$checked{'USEIBOD'}{'off'} = '';
-$checked{'USEIBOD'}{'on'} = '';
-$checked{'USEIBOD'}{$pppsettings{'USEIBOD'}} = "checked='checked'";
 
 $checked{'MODEM'}{'PCIST'} = '';
 $checked{'MODEM'}{'USB'} = '';
@@ -561,7 +563,7 @@ print <<END
 </tr>
 END
 ;
-       if ( $netsettings{'CONFIG_TYPE'} =~ /^(2|3|6|7)$/ && ( $netsettings{'RED_TYPE'} eq "DHCP" || $netsettings{'RED_TYPE'} eq "STATIC") ) {
+       if ( $netsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && ( $netsettings{'RED_TYPE'} eq "DHCP" || $netsettings{'RED_TYPE'} eq "STATIC") ) {
                $pppsettings{'AUTOCONNECT'} = 'on';
                print "<tr><td colspan='3' width='75%'>$Lang::tr{'connect on ipfire restart'}</td>\n";
                print "<td width='25%'><input type='checkbox' disabled='disabled' name='AUTOCONNECT' value='on' $checked{'AUTOCONNECT'}{'on'}></td>\n";
@@ -807,7 +809,7 @@ sub initprofile
        &General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
 
        # empty profile partial pre-initialization
-       if ($netsettings{'CONFIG_TYPE'} =~ /^(2|3|6|7)$/) {
+       if ($netsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/) {
                $pppsettings{'TYPE'}=lc($netsettings{'RED_TYPE'});
        } else {
                $pppsettings{'TYPE'}='modem';