From 3d37005a3d0c9a90578fcb249b823f08a6c58f49 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 12 Jan 2009 23:53:13 +0000 Subject: We now warn about clock skews rc-update -u will force a regen of the dep tree rc_newer_than and rc_olderthan now take another two parameters for newest/oldest file and mtime --- init.d/savecache.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'init.d/savecache.in') diff --git a/init.d/savecache.in b/init.d/savecache.in index 69c75e9..a10de3c 100644 --- a/init.d/savecache.in +++ b/init.d/savecache.in @@ -1,11 +1,18 @@ #!@PREFIX@/sbin/runscript -# Copyright 2007-2008 Roy Marples +# Copyright 2007-2009 Roy Marples # All rights reserved. Released under the 2-clause BSD license. description="Saves the caches OpenRC uses to non volatile storage" start() { + if [ -e "${RC_SVCDIR}"/clock-skewed ]; then + ewarn "WARNING: clock skew detected!" + if ! yesno "savecache_skewed"; then + eerror "Not saving deptree cache" + return 1 + fi + fi ebegin "Saving dependency cache" if [ ! -d "${RC_LIBDIR}"/cache ]; then rm -rf "${RC_LIBDIR}"/cache -- cgit v1.2.3