Revision: 7204
http://sourceforge.net/p/ipcop/svn/7204
Author: owes
Date: 2014-01-08 07:17:38 +0000 (Wed, 08 Jan 2014)
Log Message:
-----------
Add some logging for manual uploads.
Modified Paths:
--------------
ipcop/trunk/html/cgi-bin/updates.cgi
Modified: ipcop/trunk/html/cgi-bin/updates.cgi
===================================================================
--- ipcop/trunk/html/cgi-bin/updates.cgi 2014-01-08 06:04:23 UTC (rev
7203)
+++ ipcop/trunk/html/cgi-bin/updates.cgi 2014-01-08 07:17:38 UTC (rev
7204)
@@ -19,7 +19,7 @@
# (c) The SmoothWall Team
#
# With many, many changes since 2001,
-# (c) 2001-2012, the IPCop team
+# (c) 2001-2014, the IPCop team
#
# $Id$
#
@@ -98,13 +98,23 @@
# TODO: verify if we know about this .tgz.gpg file
- &General::log("installpackage", "Uploaded update file:
$uploadsettings{'FH'}");
+ &General::log("installpackage", "Upload update: $uploadsettings{'FH'}");
if (copy($uploadsettings{'FH'}, "/var/patches/$uploadsettings{'FH'}") !=
1) {
- $errormessage = $!;
+ $errormessage = $!;
+ &General::log("installpackage", "Upload error: $errormessage");
}
else {
- $errormessage = &get_error(system("/usr/local/bin/installpackage
--test=/var/patches/$uploadsettings{'FH'} >/dev/null") >> 8);
+ my $ret = system("/usr/local/bin/installpackage
--test=/var/patches/$uploadsettings{'FH'} >/dev/null") >> 8;
+ $errormessage = &get_error($ret);
+ if ($ret) {
+ &General::log("installpackage", "Update package error: $ret");
+ }
+ else {
+ my $patchsize = 0;
+ $patchsize = int((stat("/var/patches/$uploadsettings{'FH'}"))[7] /
1024)+1;
+ &General::log("installpackage", "Upload complete, size:
${patchsize} KiB");
+ }
}
}
elsif (index($uploadsettings{'ACTION'}, 'download-') != -1) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn