# filesystem type
FSTYPE="btrfs"
+# start comparing pre- and post-snapshot in background after creating
+# post-snapshot
+BACKGROUND_COMPARISON="yes"
+
# run daily number cleanup
NUMBER_CLEANUP="yes"
+-------------------------------------------------------------------
+Tue Mar 06 11:37:34 CET 2012 - aschnell@suse.de
+
+- allow to disable background comparison (bnc#726122)
+- 0.0.10
+
-------------------------------------------------------------------
Fri Mar 02 16:25:26 CET 2012 - aschnell@suse.de
/*
- * Copyright (c) [2004-2011] Novell, Inc.
+ * Copyright (c) [2004-2012] Novell, Inc.
*
* All Rights Reserved.
*
}
+ void
+ SysconfigFile::setValue(const string& key, bool value)
+ {
+ setValue(key, value ? "yes" : "no");
+ }
+
+
+ bool
+ SysconfigFile::getValue(const string& key, bool& value) const
+ {
+ string tmp;
+ if (!getValue(key, tmp))
+ return false;
+
+ value = tmp == "yes";
+ return true;
+ }
+
+
void
SysconfigFile::setValue(const string& key, const string& value)
{
bool
SysconfigFile::getValue(const string& key, vector<string>& values) const
{
- values.clear();
-
string tmp;
if (!getValue(key, tmp))
return false;
if (!tmp.empty())
boost::split(values, tmp, boost::is_any_of(" \t"), boost::token_compress_on);
+ else
+ values.clear();
return true;
}
/*
- * Copyright (c) [2004-2011] Novell, Inc.
+ * Copyright (c) [2004-2012] Novell, Inc.
*
* All Rights Reserved.
*
SysconfigFile(const string& name) : AsciiFile(name), modified(false) {}
~SysconfigFile() { if (modified) save(); }
+ void setValue(const string& key, bool value);
+ bool getValue(const string& key, bool& value) const;
+
void setValue(const string& key, const string& value);
bool getValue(const string& key, string& value) const;
/*
- * Copyright (c) 2011 Novell, Inc.
+ * Copyright (c) [2011-2012] Novell, Inc.
*
* All Rights Reserved.
*
if (snapshot2 == snapshots.end() || snapshot2->isCurrent())
throw IllegalSnapshotException();
+ bool background_comparison = true;
+ config->getValue("BACKGROUND_COMPARISON", background_comparison);
+ if (!background_comparison)
+ return;
+
y2mil("num1:" << snapshot1->getNum() << " num2:" << snapshot2->getNum());
if (!snapshot1->isCurrent())