X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Findex.cgi;h=cd1c0c200eef6825314cba179c289a5045646022;hp=a1b0369e6e7da4a6b62eace785a0555bcb3db8aa;hb=922092717b57a984732ecb8a2ad595dccadcf81b;hpb=62f1526aab63d038e3d2c164ed36a480c1917451
diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi
index a1b0369e6e..cd1c0c200e 100644
--- a/html/cgi-bin/index.cgi
+++ b/html/cgi-bin/index.cgi
@@ -39,6 +39,7 @@ my $warnmessage = '';
my $refresh = "";
my $ipaddr='';
+
&Header::showhttpheaders();
$cgiparams{'ACTION'} = '';
@@ -57,6 +58,14 @@ my %mainsettings = ();
my $connstate = &Header::connectionstatus();
+# check if reboot is necessary
+my $reboot = 0;
+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'}/ ){
@@ -128,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 $Lang::tr{'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)$/ )) {
@@ -314,9 +328,9 @@ END
END
if ( `cat /var/ipfire/proxy/advanced/settings | grep ^ENABLE=on` ) {
- print "Proxy an";
+ print $Lang::tr{'advproxy on'};
if ( `cat /var/ipfire/proxy/advanced/settings | grep ^TRANSPARENT=on` ) { print " (transparent)"; }
- } else { print "Proxy aus"; }
+ } else { print $Lang::tr{'advproxy off'}; }
}
if ( $netsettings{'BLUE_DEV'} ) { print <$Lang::tr{'wireless'}
@@ -324,9 +338,9 @@ END
|
END
if ( `cat /var/ipfire/proxy/advanced/settings | grep ^ENABLE_BLUE=on` ) {
- print "Proxy an";
+ print $Lang::tr{'advproxy on'};
if ( `cat /var/ipfire/proxy/advanced/settings | grep ^TRANSPARENT_BLUE=on` ) { print " (transparent)"; }
- } else { print "Proxy aus"; }
+ } else { print $Lang::tr{'advproxy off'}; }
}
if ( $netsettings{'ORANGE_DEV'} ) { print <$Lang::tr{'dmz'}
@@ -337,7 +351,7 @@ END
if ( `cat /var/ipfire/vpn/settings | grep ^ENABLED=on` ||
`cat /var/ipfire/vpn/settings | grep ^ENABLED_BLUE=on` ) {
my $ipsecip = `cat /var/ipfire/vpn/settings | grep ^VPN_IP= | cut -c 8-`;
- my @status = `/usr/sbin/ipsec auto --status`;
+ my @status = `/usr/local/bin/ipsecctrl I`;
my %confighash = ();
&General::readhasharray("${General::swroot}/vpn/config", \%confighash);
print <$warnmessage";
}
@@ -437,8 +452,10 @@ END
;
&Pakfire::dblist("upgrade", "notice");
print < $Lang::tr{'needreboot'}!";
+}
} else {
my $message='';
if ($death) {
@@ -462,5 +479,37 @@ END
}
&Header::closebox();
+}
+
+else {
+&Header::openbox('100%', 'left', $Lang::tr{'gpl license agreement'});
+print <
+END
+;
+if (`find /usr/share/doc/licenses/GPLv3 2>/dev/null`) {
+ print '';
+}
+else {
+ print ' GNU GENERAL PUBLIC LICENSE ';
+}
+print <
+
+
+ $Lang::tr{'gpl unofficial translation of the general public license v3'}
+
+END
+
+&Header::closebox();
+}
+
&Header::closebigbox();
&Header::closepage();
| | | |