diff options
author | Roy Marples <roy@marples.name> | 2009-01-12 23:53:13 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2009-01-12 23:53:13 +0000 |
commit | 3d37005a3d0c9a90578fcb249b823f08a6c58f49 (patch) | |
tree | 005e0d07af432e9fa6723bfbcc315654929e6758 /init.d/savecache.in | |
parent | 2243c013900f1d3d850acf066dde2e83f41b3ed9 (diff) |
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
Diffstat (limited to 'init.d/savecache.in')
-rw-r--r-- | init.d/savecache.in | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/init.d/savecache.in b/init.d/savecache.in index 69c75e98..a10de3c2 100644 --- a/init.d/savecache.in +++ b/init.d/savecache.in @@ -1,11 +1,18 @@ #!@PREFIX@/sbin/runscript -# Copyright 2007-2008 Roy Marples <roy@marples.name> +# Copyright 2007-2009 Roy Marples <roy@marples.name> # 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 |