From: Christian Schmidt Date: Wed, 15 Dec 2010 17:45:59 +0000 (+0100) Subject: Some more stderr fixes for the CGIs. X-Git-Tag: v2.9-beta2~18^2~2 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=26906d98239bf79d9344e8f0796d5ca40d02ee73 Some more stderr fixes for the CGIs. --- diff --git a/config/rootfiles/core/44/filelists/files b/config/rootfiles/core/44/filelists/files index 3de21f5199..3bd66d5ba4 100644 --- a/config/rootfiles/core/44/filelists/files +++ b/config/rootfiles/core/44/filelists/files @@ -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 diff --git a/html/cgi-bin/backup.cgi b/html/cgi-bin/backup.cgi index 86814e9719..e526fc30e9 100644 --- a/html/cgi-bin/backup.cgi +++ b/html/cgi-bin/backup.cgi @@ -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 </dev/null`; if ( $testcmd =~ /is\ running/ && $testcmd !~ /is\ not\ running/){ $status = "$Lang::tr{'running'}";