Revision: 6444 http://ipcop.svn.sourceforge.net/ipcop/?rev=6444&view=rev Author: owes Date: 2012-03-02 12:47:08 +0000 (Fri, 02 Mar 2012) Log Message: ----------- Since 2.0.3 we can no longer use available.xml as indicator for last update-check. Add an indicator file (in /var/log to avoid writes to flash) for index.cgi etc.
Modified Paths: -------------- ipcop/trunk/src/libs/general-functions.pl Modified: ipcop/trunk/src/libs/general-functions.pl =================================================================== --- ipcop/trunk/src/libs/general-functions.pl 2012-03-02 07:41:48 UTC (rev 6443) +++ ipcop/trunk/src/libs/general-functions.pl 2012-03-02 12:47:08 UTC (rev 6444) @@ -1220,6 +1220,7 @@ } } + system('/usr/bin/touch', '/var/log/updates.check'); if (${General::version} eq $available->{"latest"}) { # We are uptodate, nothing left to do return 0; @@ -1280,7 +1281,13 @@ return "$Lang::tr{'there are updates'}"; } - my $age = &General::age('/var/ipcop/patches/available.xml'); + my $age; + if (-e '/var/log/updates.check') { + $age = &General::age('/var/log/updates.check'); + } + else { + $age = &General::age('/var/ipcop/patches/available.xml'); + } if ($age =~ m/(\d{1,3})d/) { if ($1 >= 7) { return "$Lang::tr{'updates is old1'} $1 $Lang::tr{'updates is old2'}"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn