Re: Time skew on SuSE 9.1

Lars Ellenberg <[email protected]> Thu, 16 Feb 2006 13:54:34 +0100
Newsgroups gmane.linux.suse.fou4s.devel
Message-ID <[email protected]>
/ 2006-02-16 10:45:11 +0100
\ Kevin Ivory:
> On 2006-02-13 22:56, Jochen Schaeuble wrote:
> > every time I run fou4s I get the error message:
> > 
> > Warning: Time skew detected - fou4s cache newer than system time!
> > 
> > How do I get rid of this message? It's quite annoying since I run fou4s as cron job.
> 
> I have been seeing the same here but haven't had time to debug it.
> All our systems run with NTP, no crons touch cache files (as far as
> I know). I even removed the whole contents of the /var/cache/fou4s
> directories and recreated...


nice try :)
/proc/cmdline is the kernel boot commandline.
obviously /proc/self/cmdline or /proc/$$/cmdline is meant...

cheers,

--- fou4s.orig	2006-02-16 13:51:28.000000000 +0100
+++ fou4s	2006-02-16 13:51:45.000000000 +0100
@@ -1155,7 +1155,7 @@
 	[[ $1 == force ]] && force=1
 	[[ -z $HOSTEXEC && $RPMVER == 3 && /var/lib/rpm/packages.rpm -nt $RPMCACHE ]] && force=1
 	[[ -z $HOSTEXEC && $RPMVER == 4 && /var/lib/rpm/Packages -nt $RPMCACHE ]] && force=1
-	if [[ $RPMCACHE -nt /proc/cmdline ]] ; then
+	if [[ $RPMCACHE -nt /proc/self/cmdline ]] ; then
 		myWarn 0 "Warning: Time skew detected - fou4s cache newer than system time!"
 		cleanCache
 		force=1

-- 
: Lars Ellenberg                                  Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :
--