aboutsummaryrefslogtreecommitdiff
path: root/init.d/savecache.in
diff options
context:
space:
mode:
Diffstat (limited to 'init.d/savecache.in')
-rw-r--r--init.d/savecache.in9
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