licenses: Remove the braindead GPL acception stage

The GPL is not an EULA and so there is no value in having users
accept it.

The UI is very broken and so I believe it is best to drop this entirely.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2024-08-06 16:44:53 +02:00
parent f7879935a5
commit 76f429d5d8
10 changed files with 4 additions and 190 deletions

View File

@@ -1,101 +0,0 @@
#!/usr/bin/perl
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2012 IPFire Team <info@ipfire.org> #
# #
# 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;
# enable only the following on debugging purpose
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
require "/opt/pakfire/lib/functions.pl";
# If the license has already been accepted.
if ( -e "/var/ipfire/main/gpl_accepted" ) {
&redirect();
}
my %cgiparams;
$cgiparams{'ACTION'} = '';
&Header::getcgihash(\%cgiparams);
# Check if the license agreement has been accepted.
if ($cgiparams{'ACTION'} eq "$Lang::tr{'yes'}" && $cgiparams{'gpl_accepted'} eq '1') {
open(FILE, ">/var/ipfire/main/gpl_accepted");
close(FILE);
&redirect();
}
&Header::showhttpheaders();
&Header::openpage($Lang::tr{'main page'}, 1);
&Header::openbigbox('', 'center');
&Header::openbox('100%', 'left', $Lang::tr{'gpl license agreement'});
print <<END;
$Lang::tr{'gpl please read carefully the general public license and accept it below'}.
<br /><br />
END
;
if ( -e "/usr/share/doc/licenses/GPLv3" ) {
print '<textarea rows=\'25\' cols=\'75\' readonly=\'readonly\'>';
# Open and read-in GPL file content.
open(FILE, "/usr/share/doc/licenses/GPLv3");
# Grab license.
my @license = <FILE>;
# Close filehandle.
close(FILE);
# Print license to textarea.
print "@license";
print '</textarea>';
}
else {
print '<br /><a href=\'http://www.gnu.org/licenses/gpl-3.0.txt\' target=\'_blank\'>GNU GENERAL PUBLIC LICENSE</a><br />';
}
print <<END;
<p>
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<input type='checkbox' name='gpl_accepted' value='1'/> $Lang::tr{'gpl i accept these terms and conditions'}.
<br/ >
<input type='submit' name='ACTION' value='$Lang::tr{'yes'}' />
</form>
</p>
<a href='http://www.gnu.org/licenses/translations.html' target='_blank'>$Lang::tr{'gpl unofficial translation of the general public license v3'}</a>
END
&Header::closebox();
&Header::closebigbox();
&Header::closepage();
sub redirect {
print "Status: 302 Moved Temporarily\n";
print "Location: index.cgi\n\n";
exit (0);
}

View File

@@ -48,12 +48,6 @@ my $showbox=0;
my $showipsec=0;
my $showovpn=0;
if ( ! -e "/var/ipfire/main/gpl_accepted" ) {
print "Status: 302 Moved Temporarily\n";
print "Location: gpl.cgi\n\n";
exit (0);
}
&Header::showhttpheaders();
$cgiparams{'ACTION'} = '';
@@ -74,12 +68,10 @@ my %mainsettings = ();
my $connstate = &Header::connectionstatus();
if ( -e "/var/ipfire/main/gpl_accepted" ) {
if ($connstate =~ /$Lang::tr{'connecting'}/ || /$Lang::tr{'connection closed'}/ ){
$refresh = "<meta http-equiv='refresh' content='5;'>";
}elsif ($connstate =~ /$Lang::tr{'dod waiting'}/ || -e "${General::swroot}/main/refreshindex") {
$refresh = "<meta http-equiv='refresh' content='30;'>";
}
if ($connstate =~ /$Lang::tr{'connecting'}/ || /$Lang::tr{'connection closed'}/ ){
$refresh = "<meta http-equiv='refresh' content='5;'>";
} elsif ($connstate =~ /$Lang::tr{'dod waiting'}/ || -e "${General::swroot}/main/refreshindex") {
$refresh = "<meta http-equiv='refresh' content='30;'>";
}
if ($cgiparams{'ACTION'} eq $Lang::tr{'dial profile'})

View File

@@ -19,11 +19,5 @@
# #
###############################################################################
if (! -e "/var/ipfire/main/gpl_accepted" ) {
print "Status: 302 Moved Temporarily\n";
print "Location: /cgi-bin/gpl.cgi\n\n";
exit (0);
}
print "Status: 302 Moved Temporarily\n";
print "Location: /cgi-bin/index.cgi\n\n";