Debuginformationen aus den CGIs entfernt

Hoffentlich die letzten Config Types bereinigt
Samba und SSHd init Skripte angepasst
Pakfire CGI optisch angepasst


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@779 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
maniacikarus
2007-08-17 16:00:01 +00:00
parent 50418f3877
commit cb5e9c6c64
36 changed files with 87 additions and 90 deletions

View File

@@ -265,6 +265,7 @@ WARNING: translation string unused: ovpn_processprioVH
WARNING: translation string unused: ovpnstatus log
WARNING: translation string unused: ovpnsys log
WARNING: translation string unused: package failed to install
WARNING: translation string unused: pakfire available addons
WARNING: translation string unused: password contains illegal characters
WARNING: translation string unused: password crypting key
WARNING: translation string unused: passwords must be at least 6 characters in length

View File

@@ -293,6 +293,7 @@ WARNING: translation string unused: ovpn_processprioVH
WARNING: translation string unused: ovpnstatus log
WARNING: translation string unused: ovpnsys log
WARNING: translation string unused: package failed to install
WARNING: translation string unused: pakfire available addons
WARNING: translation string unused: password contains illegal characters
WARNING: translation string unused: password crypting key
WARNING: translation string unused: passwords must be at least 6 characters in length

View File

@@ -12,7 +12,7 @@
# to fully troubleshot your code, uncomment diagnostics, Carp and cluck lines
#use diagnostics; # need to add the file /usr/lib/perl5/5.8.x/pods/perldiag.pod before to work
# next look at /var/log/httpd/error_log , http://www.perl.com/pub/a/2002/05/07/mod_perl.html may help
use warnings;
#use warnings;
use strict;
#use Carp ();
#local $SIG{__WARN__} = \&Carp::cluck;
@@ -230,7 +230,7 @@ if ($errormessage) {
print "<font class='base'>$errormessage&nbsp;</font>";
&Header::closebox();
}
unless (( $netsettings{'CONFIG_TYPE'} =~ /^(2|3|6|7)$/ ) && ($netsettings{'RED_TYPE'} eq 'STATIC'))
unless (( $netsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ ) && ($netsettings{'RED_TYPE'} eq 'STATIC'))
{
&Header::openbox('100%', 'left', $Lang::tr{'capswarning'});
print <<END

View File

@@ -8,8 +8,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
use File::Copy;
require '/var/ipfire/general-functions.pl';
@@ -58,7 +58,7 @@ elsif ( $cgiparams{'ACTION'} eq "restore" )
print UPLOADFILE;
}
close UPLOADFILE;
system("/usr/local/bin/backupctrl restore >/dev/null");
system("/usr/local/bin/backupctrl restore");
}
&Header::showhttpheaders();

View File

@@ -21,7 +21,7 @@ use strict;
# enable only the following on debugging purpose
#use warnings;
use CGI::Carp 'fatalsToBrowser';
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -16,8 +16,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -22,8 +22,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -9,8 +9,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -11,8 +11,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -10,8 +10,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
# use warnings;
# use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -13,8 +13,8 @@ use File::Temp qw/ tempfile tempdir /;
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -10,8 +10,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -11,8 +11,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -11,8 +11,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -8,8 +8,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
@@ -231,19 +231,16 @@ foreach (@songdb){
@year = sort keys %hash;
my %hash = map{ $_, 1 }@genre;
@genre = sort keys %hash;
print <<END
<table width='95%' cellspacing='0'>
END
;
if ( $#songdb eq '-1' ) {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'year'}</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'genre'}</b></td></tr>";}
else {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'year'} - $#year</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'genre'} - $#genre</b></td></tr>>";}
print "<table width='95%' cellspacing='0'>";
if ( $#songdb eq '-1' ) {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'artist'}</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'album'}</b></td></tr>";}
else {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'artist'} - $#artist</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'album'} - $#album</b></td></tr>";}
print <<END
<tr><td align='center'>
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<select name='artist' size='8' multiple='multiple' style='width:300px;'>
END
;
foreach (@artist){if ( $_ ne '' ){print "<option>$_</option>";}}
foreach (@artist){if ( $_ ne '' ){print "<option>$_</option>";}}
print <<END
</select><br/>
<input type='hidden' name='ACTION' value='playartist' />
@@ -263,8 +260,8 @@ print <<END
</tr>
END
;
if ( $#songdb eq '-1' ) {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'artist'}</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'album'}</b></td></tr>";}
else {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'artist'} - $#artist</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'album'} - $#album</b></td></tr>";}
if ( $#songdb eq '-1' ) {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'year'}</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'genre'}</b></td></tr>";}
else {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'year'} - $#year</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'genre'} - $#genre</b></td></tr>";}
print <<END
<tr><td align='center'>
<form method='post' action='$ENV{'SCRIPT_NAME'}'>

View File

@@ -11,8 +11,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
@@ -75,7 +75,7 @@ foreach my $graphname (@graphs) {
if ($cgiparams[1] =~ /red/) {
if ( $netsettings{'CONFIG_TYPE'} =~ /^(2|3|6|7)$/ && $netsettings{'RED_TYPE'} eq "DHCP") {
if ( $netsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $netsettings{'RED_TYPE'} eq "DHCP") {
&Header::openbox('100%', 'left', "RED $Lang::tr{'dhcp configuration'}");
if (-s "${General::swroot}/dhcpc/dhcpcd-$netsettings{'RED_DEV'}.info") {

View File

@@ -9,8 +9,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -11,8 +11,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
@@ -21,6 +21,8 @@ require "/opt/pakfire/lib/functions.pl";
my %pakfiresettings=();
my $errormessage = '';
my %color = ();
my %mainsettings = ();
&Header::showhttpheaders();
@@ -33,6 +35,8 @@ $pakfiresettings{'AUTOUPDATE'} = 'off';
$pakfiresettings{'UUID'} = 'on';
&Header::getcgihash(\%pakfiresettings);
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
&Header::openpage($Lang::tr{'pakfire configuration'}, 1);
&Header::openbigbox('100%', 'left', '', $errormessage);
@@ -184,7 +188,8 @@ system("pakfire update &>dev/null");
print <<END;
<table width='100%'>
<tr><td width='40%' align="center">Verfuegbare Addons:<br />
<tr><td bgcolor='$color{'color20'}' align="center"><b>$Lang::tr{'pakfire installed addons'}</b></td><td bgcolor='$color{'color20'}'></td><td bgcolor='$color{'color20'}' align="center"><b>$Lang::tr{'pakfire installed addons'}</b>
<tr><td width='40%' align="center">
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<select name="INSPAKS" size="10" multiple>
END
@@ -207,7 +212,7 @@ print <<END;
<input type='hidden' name='ACTION' value='remove' />
<input type='image' alt='$Lang::tr{'remove'}' src='/images/list-remove.png' />
</td>
<td width='40%' align="center">$Lang::tr{'pakfire installed addons'}<br />
<td width='40%' align="center">
<select name="DELPAKS" size="10" multiple>
END
@@ -216,10 +221,10 @@ END
print <<END;
</select>
</table></form>
<br /><hr /><br />
<br />
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<table width='100%'>
<tr><td colspan='2'>$Lang::tr{'pakfire updates'}
<tr><td colspan='3' bgcolor='$color{'color20'}'><b>$Lang::tr{'pakfire updates'}</b></br>
<tr><td width='20%'>&nbsp;<td width='60%' align='center'>
<select name="UPDPAKS" size="5" disabled>
END
@@ -231,14 +236,15 @@ print <<END;
<td width='20%' align='center' valign='middle'><input type='hidden' name='ACTION' value='upgrade' />
<input type='image' alt='$Lang::tr{'upgrade'}' src='/images/document-save.png' />
</table></form>
<br /><hr /><br />
<br />
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<table width='100%'>
<tr><td colspan='4' bgcolor='$color{'color20'}'><b>$Lang::tr{'basic options'}</b></br>
<tr><td width='40%' align="right">$Lang::tr{'pakfire update daily'}
<td width='10%' align="left"><input type="checkbox" name="AUTOUPDATE" $checked{'AUTOUPDATE'}{'on'} />
<td width='40%' align="right">$Lang::tr{'pakfire register'}
<td width='10%' align="left"><input type="checkbox" name="UUID" $checked{'UUID'}{'on'} />
<tr><td width='100%' colspan="4" align="right"><input type="submit" name="ACTION" value="$Lang::tr{'save'}" />
<tr><td width='100%' colspan="4" align="center"><input type="submit" name="ACTION" value="$Lang::tr{'save'}" />
</table>
</form>
END

View File

@@ -204,13 +204,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 +301,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 +339,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 +551,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 +797,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';

View File

@@ -10,8 +10,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -11,7 +11,7 @@ use RRDs;
use strict;
# enable only the following on debugging purpose
# use warnings;
use CGI::Carp 'fatalsToBrowser';
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -11,8 +11,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -8,8 +8,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -8,8 +8,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -11,8 +11,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -20,8 +20,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -16,8 +16,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -8,8 +8,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -10,8 +10,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
use IO::Socket;

View File

@@ -9,8 +9,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -10,8 +10,8 @@
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
use File::Copy;
use IO::Socket;

View File

@@ -6,8 +6,8 @@ use File::Temp qw/ tempfile tempdir /;
use strict;
# enable only the following on debugging purpose
use warnings;
use CGI::Carp 'fatalsToBrowser';
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";

View File

@@ -1214,6 +1214,7 @@
'package failed to install' => 'Programmpaket konnte nicht installiert werden.',
'pagerefresh' => 'Seite wird aktualisiert. Bitte warten.',
'pakfire accept all' => 'Möchten Sie der Installation aller Pakete zustimmen?',
'pakfire available addons' => 'Verfügbare Addons:',
'pakfire configuration' => 'Pakfire Konfiguration',
'pakfire install package' => 'Sie möchten folgende Pakete installieren: ',
'pakfire installed addons' => 'Installierte Addons:',

View File

@@ -1242,6 +1242,7 @@
'package failed to install' => 'Package failed to install.',
'pagerefresh' => 'Page is beeing refreshed, please wait.',
'pakfire accept all' => 'Do you want to install all packages?',
'pakfire available addons' => 'Available Addons:',
'pakfire configuration' => 'Pakfire Configuration',
'pakfire install package' => 'You want to install the following packages: ',
'pakfire installed addons' => 'Installed Addons:',

View File

@@ -21,10 +21,10 @@ case "$1" in
stop)
boot_mesg "Stopping smbd..."
killproc /usr/sbin/smbd
killproc -p /var/run/smbd.pid /usr/sbin/smbd
boot_mesg "Stopping nmbd..."
killproc /usr/sbin/nmbd
killproc -p /var/run/nmbd.pid /usr/sbin/nmbd
;;
reload)
@@ -37,7 +37,7 @@ case "$1" in
restart)
$0 stop
sleep 5
sleep 3
$0 start
;;

View File

@@ -15,7 +15,7 @@ case "$1" in
boot_mesg "Starting SSH Server..."
# Also prevent ssh from being killed by out of memory conditions
loadproc /usr/sbin/sshd
sleep 1
sleep 3
echo "-16" >/proc/`cat /var/run/sshd.pid`/oom_adj
;;