]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Some more stderr fixes for the CGIs.
authorChristian Schmidt <maniacikarus@ipfire.org>
Wed, 15 Dec 2010 17:45:59 +0000 (18:45 +0100)
committerChristian Schmidt <maniacikarus@ipfire.org>
Wed, 15 Dec 2010 17:45:59 +0000 (18:45 +0100)
config/rootfiles/core/44/filelists/files
html/cgi-bin/backup.cgi
html/cgi-bin/services.cgi

index 3de21f5199e28127a3deaf1c52ea40d61ea164c3..3bd66d5ba43b7720d4c7bb895d70b86e770632ff 100644 (file)
@@ -21,6 +21,8 @@ srv/web/ipfire/cgi-bin/memory.cgi
 srv/web/ipfire/cgi-bin/netexternal.cgi
 srv/web/ipfire/cgi-bin/netinternal.cgi
 srv/web/ipfire/cgi-bin/system.cgi
+srv/web/ipfire/cgi-bin/services.cgi
+srv/web/ipfire/cgi-bin/backup.cgi
 srv/web/ipfire/cgi-bin/logs.cgi/log.dat
 srv/web/ipfire/html/images/urlfilter/copy.gif
 var/ipfire/general-functions.pl
index 86814e9719e9e09c12b5a1ecfe3db0c92cc84249..e526fc30e9c06d00f15ffa11afe63a3abd177ffc 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2005-2010  IPFire Team                                        #
 #                                                                             #
 # 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        #
@@ -35,6 +35,8 @@ my %cgiparams=();
 my %checked = ();
 my $message = "";
 my $errormessage = "";
+my @backups = "";
+my @backupisos = "";
 
 $a = new CGI;
 
@@ -150,8 +152,13 @@ if ( $message ne "" ){
        &Header::closebox();
 }
 
-my @backups = `cd /var/ipfire/backup/ && ls *.ipf 2>/dev/null`;
-my @backupisos = `cd /var/tmp/backupiso/ && ls *.iso 2>/dev/null`;
+if ( -e "/var/ipfire/backup/" ){
+       @backups = `cd /var/ipfire/backup/ && ls *.ipf 2>/dev/null`;
+}
+
+if ( -e "/var/tmp/backupiso/" ){
+       @backupisos = `cd /var/tmp/backupiso/ && ls *.iso 2>/dev/null`;
+}
 
 &Header::openbox('100%', 'center', $Lang::tr{'backup'});
 
@@ -186,7 +193,7 @@ print <<END
 END
 ;
 foreach (@backups){
-chomp($_);
+       chomp($_);
 my $Datei = "/var/ipfire/backup/".$_;
 my @Info = stat($Datei);
 my $Size = $Info[7] / 1024 / 1024;
index 156db2d2407cab273687a57820f022b841fbd464..424ca868f15161e1694d55217032080ddbc99ace 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2008  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2005-2010  IPFire Team                                        #
 #                                                                             #
 # 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        #
@@ -275,7 +275,7 @@ sub isrunningaddon{
        my $exename;
        my @memory;
 
-       my $testcmd = `/usr/local/bin/addonctrl $_ status`;
+       my $testcmd = `/usr/local/bin/addonctrl $_ status 2>/dev/null`;
 
        if ( $testcmd =~ /is\ running/ && $testcmd !~ /is\ not\ running/){
                $status = "<td align='center' bgcolor='${Header::colourgreen}'><font color='white'><b>$Lang::tr{'running'}</b></font></td>";