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=6a78baa9bc12bba26eee9b70f2552e2ed01f9840;hb=922092717b57a984732ecb8a2ad595dccadcf81b;hpb=bb2795c7898c315299f7310c5d26c763a98e08fe diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index 6a78baa9bc..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)$/ )) { @@ -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 i accept these terms and conditions'}. +
+ +
+

+ $Lang::tr{'gpl unofficial translation of the general public license v3'} + +END + +&Header::closebox(); +} + &Header::closebigbox(); &Header::closepage();