[Lunar-commits] <moonbase> mysql: install it without questions if it's not already installed.

Florin Braescu florin at lunar-linux.org
Sat Mar 13 11:49:16 CET 2010


commit f40dce5beef8d9f02846a67e17287367c57017d0
Author: Florin Braescu <florin at lunar-linux.org>
Date:   Sat Mar 13 12:49:16 2010 +0200

    mysql: install it without questions if it's not already installed.
---
 sql/mysql/PRE_BUILD |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/sql/mysql/PRE_BUILD b/sql/mysql/PRE_BUILD
index d729ffd..be65c32 100644
--- a/sql/mysql/PRE_BUILD
+++ b/sql/mysql/PRE_BUILD
@@ -1,14 +1,15 @@
-message " "
-message " ${PROBLEM_COLOR}Warning! ${DEFAULT_COLOR}Database backup have to be done to avoid any data loss during migration."
-message " "
-
-if ! query "Have you done data backup (y/n)? " n; then
+if module_installed mysql; then
+   message " "
+   message " ${PROBLEM_COLOR}Warning! ${DEFAULT_COLOR}Database backup have to be done to avoid any data loss during migration."
    message " "
-   message " ${DEFAULT_COLOR}Please consult first http://dev.mysql.com/doc/refman/5.1/en/upgrade.html before installing."
+   if ! query "Have you done data backup (y/n)? " n; then
+      message " "
+      message " ${DEFAULT_COLOR}Please consult first http://dev.mysql.com/doc/refman/5.1/en/upgrade.html before installing."
+      message " "
+      sleep 5
+      exit 1
+   fi
    message " "
-   sleep 5
-   exit 1
 fi
-message " "
 
 default_pre_build


More information about the Lunar-commits mailing list