small file systems are checksummed
authorheiko
Sat, 18 Nov 2006 01:48:46 +0000
changeset 6 1cfeff31c7d0
parent 5 6073323768a4
child 7 e5342725e14a
small file systems are checksummed
debian/changelog
ha-sync
--- a/debian/changelog	Sat Nov 18 01:21:00 2006 +0000
+++ b/debian/changelog	Sat Nov 18 01:48:46 2006 +0000
@@ -1,3 +1,9 @@
+ha-sync (0.4-1) testing; urgency=low
+
+  * new upstream
+
+ -- Heiko Schlittermann <hs@schlittermann.de>  Sat, 18 Nov 2006 03:40:22 +0100
+
 ha-sync (0.3-1) testing; urgency=low
 
   * use drbdlinks!
--- a/ha-sync	Sat Nov 18 01:21:00 2006 +0000
+++ b/ha-sync	Sat Nov 18 01:48:46 2006 +0000
@@ -54,7 +54,14 @@
 
 cd / || exit 1
 for FS in ${FILESYSTEMS%/}/; do
+	extraopt=
+
+	# if less than 100M: checksumming
+	test "`df -m \"$FS\" | awk 'NR == 2 {print $3 < 100}'`" = 1 \
+		&& extraopt=-c
+
 	${opt_debug+echo} rsync ${opt_dry+-n} \
+		$extraopt \
 		--exclude-from $extra \
 		--exclude-from /etc/ha-sync/exclude \
 		--del -Ravx .$FS `other`:/