From 8487c2490f8824978751fd25137c2f18cf0446dc Mon Sep 17 00:00:00 2001
From: Antoine Catton <acatton@tiolive.com>
Date: Wed, 28 Sep 2011 10:32:32 +0200
Subject: [PATCH] Fix: mariadb would recover again next restart

This is a working version of 41f95a7407a2767cc141726b76904d1b679f468f
---
 slapos/recipe/mysql/recover.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/slapos/recipe/mysql/recover.py b/slapos/recipe/mysql/recover.py
index f56952029..7641321a9 100644
--- a/slapos/recipe/mysql/recover.py
+++ b/slapos/recipe/mysql/recover.py
@@ -34,4 +34,9 @@ def import_remote_dump(kwargs):
                            stdin=zcat.stdout)
   zcat.stdout.close()
 
-  sys.exit(mysql.poll())
+  returncode = mysql.poll()
+
+  if returncode == 0:
+    open(lock_file, 'w').close() # Just a touch
+
+  sys.exit(returncode)
-- 
2.30.9