From 7fa7c7dd2eae612f3fca2cf32b8c9b33cd54fae0 Mon Sep 17 00:00:00 2001
From: Jan Paul Tuecking
Date: Sun, 5 Dec 2010 11:08:54 +0100
Subject: [PATCH] Added license agreement for old installations to index.cgi.
---
html/cgi-bin/index.cgi | 654 ++++++++++++++++++++++++++++++++++++++++-
langs/de/cgi-bin/de.pl | 4 +
langs/en/cgi-bin/en.pl | 4 +
langs/es/cgi-bin/es.pl | 4 +
langs/fr/cgi-bin/fr.pl | 4 +
5 files changed, 669 insertions(+), 1 deletion(-)
mode change 100755 => 100644 html/cgi-bin/index.cgi
diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi
old mode 100755
new mode 100644
index 052e8cac6..1a4287186
--- a/html/cgi-bin/index.cgi
+++ b/html/cgi-bin/index.cgi
@@ -64,6 +64,8 @@ if (`find /var/run/need_reboot 2>/dev/null`) {
$reboot = 1;
}
+
+
if ($cgiparams{'ACTION'} eq $Lang::tr{'shutdown'} || $cgiparams{'ACTION'} eq $Lang::tr{'reboot'}) {
$refresh = "";
} elsif ($connstate =~ /$Lang::tr{'connecting'}/ || /$Lang::tr{'connection closed'}/ ){
@@ -135,8 +137,13 @@ my $dialButtonDisabled = "disabled='disabled'";
&Header::openpage($Lang::tr{'main page'}, 1, $refresh);
&Header::openbigbox('', 'center');
-&Header::openbox('100%', 'center', &Header::cleanhtml(`/bin/uname -n`,"y"));
+# licence agreement
+if ($cgiparams{'ACTION'} eq 'Yes' && $cgiparams{'gpl_accepted'} eq '1') {
+ system('touch /var/ipfire/main/gpl_accepted')
+}
+if (`find /var/ipfire/main/gpl_accepted 2>/dev/null`) {
+&Header::openbox('100%', 'center', &Header::cleanhtml(`/bin/uname -n`,"y"));
if ( ( $pppsettings{'VALID'} eq 'yes' && $modemsettings{'VALID'} eq 'yes' ) || ( $netsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ )) {
@@ -472,5 +479,650 @@ END
}
&Header::closebox();
+}
+
+else {
+&Header::openbox('100%', 'left', $Lang::tr{'gpl license agreement'});
+print <
+
+
+
+
+ $Lang::tr{'gpl unofficial translation of the general public license v3'}
+
+END
+
+&Header::closebox();
+}
+
&Header::closebigbox();
&Header::closepage();
diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
index ddf3352db..8bdc1007a 100644
--- a/langs/de/cgi-bin/de.pl
+++ b/langs/de/cgi-bin/de.pl
@@ -831,6 +831,10 @@
'genkey' => 'PSK erzeugen',
'genre' => 'Genre',
'global settings' => 'Globale Einstellungen',
+'gpl license agreement' => 'Lizenz Vereinbarung',
+'gpl i accept these terms and conditions' => 'Ich akzeptiere diese Bedingungen und Konditionen',
+'gpl please read carefully the general public license and accept it below' => 'Bitte die General Public License genau lesen und diese unten akzeptiere',
+'gpl unofficial translation of the general public license v3' => 'Inoffizielle Ãbersetzung der General Public License v3',
'graph' => 'Diagramm',
'graph per' => 'pro',
'green' => 'GRÃN',
diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
index f89d93715..035c9c7a8 100644
--- a/langs/en/cgi-bin/en.pl
+++ b/langs/en/cgi-bin/en.pl
@@ -857,6 +857,10 @@
'genkey' => 'Generate PSK',
'genre' => 'Genre',
'global settings' => 'Global settings',
+'gpl license agreement' => 'License Agreement',
+'gpl i accept these terms and conditions' => 'I accept these terms and conditions',
+'gpl please read carefully the general public license and accept it below' => 'Please read carefully the General Public License and accept it below',
+'gpl unofficial translation of the general public license v3' => 'Unofficial translation of the General Public License v3',
'graph' => 'Graph',
'graph per' => 'per',
'green' => 'Green',
diff --git a/langs/es/cgi-bin/es.pl b/langs/es/cgi-bin/es.pl
index ca8a853fb..7ed5f5409 100644
--- a/langs/es/cgi-bin/es.pl
+++ b/langs/es/cgi-bin/es.pl
@@ -855,6 +855,10 @@
'genkey' => 'Generar PSK',
'genre' => 'Género',
'global settings' => 'Configuraciones globales',
+'gpl license agreement' => 'License Agreement',
+'gpl i accept these terms and conditions' => 'I accept these terms and conditions',
+'gpl please read carefully the general public license and accept it below' => 'Please read carefully the General Public License and accept it below',
+'gpl unofficial translation of the general public license v3' => 'Unofficial translation of the General Public License v3',
'graph' => 'Gráfico',
'graph per' => 'por',
'green' => 'Green',
diff --git a/langs/fr/cgi-bin/fr.pl b/langs/fr/cgi-bin/fr.pl
index 8c3c378dc..951092070 100644
--- a/langs/fr/cgi-bin/fr.pl
+++ b/langs/fr/cgi-bin/fr.pl
@@ -856,6 +856,10 @@
'genkey' => 'Générer PSK',
'genre' => 'Genre',
'global settings' => 'Configuration générale',
+'gpl license agreement' => 'License Agreement',
+'gpl i accept these terms and conditions' => 'I accept these terms and conditions',
+'gpl please read carefully the general public license and accept it below' => 'Please read carefully the General Public License and accept it below',
+'gpl unofficial translation of the general public license v3' => 'Unofficial translation of the General Public License v3',
'graph' => 'Graphique',
'graph per' => 'pour',
'green' => 'VERT',
--
2.39.2