summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Flatt2006-06-13 22:14:59 -0100
committerJason Flatt2006-06-13 22:14:59 -0100
commitc6b9b6979946d953bc6323293892c78137c334d3 (patch)
tree4ee47e562196440464d89376a988ee13ef34f0b1
parente47561b2144334c954945c995402b237a78ff797 (diff)
Integrate MySQL database creation tweaks, and adding FINAL.
-rwxr-xr-xcollab/drupal/CONFIGURE5
-rwxr-xr-xcollab/drupal/FINAL13
-rw-r--r--collab/drupal/HISTORY3
-rwxr-xr-xcollab/drupal/INSTALL12
4 files changed, 25 insertions, 8 deletions
diff --git a/collab/drupal/CONFIGURE b/collab/drupal/CONFIGURE
index cfd933908b..8369d24c28 100755
--- a/collab/drupal/CONFIGURE
+++ b/collab/drupal/CONFIGURE
@@ -18,12 +18,13 @@ fi
if [ "${DRUPAL_INSTALLED}" == "n" ]
then
- persistent_add DRUPAL_CREATEDB DRUPAL_CONFIGURE &&
+ persistent_add DRUPAL_CREATEDB DRUPAL_CONFIGURE MYSQL_PASSWORD &&
message "${MESSAGE_COLOR}The MySQL daemon needs to be running to create the database${DEFAULT_COLOR}" &&
if query "Create the Drupal database?" n
then
- DRUPAL_CREATEDB="y"
+ DRUPAL_CREATEDB="y" &&
+ query_string MYSQL_PASSWORD "What is the MySQL password for root (needed to create the database)? If there is no password, just press enter. " ""
else
DRUPAL_CREATEDB="n"
fi &&
diff --git a/collab/drupal/FINAL b/collab/drupal/FINAL
new file mode 100755
index 0000000000..a1ee215d62
--- /dev/null
+++ b/collab/drupal/FINAL
@@ -0,0 +1,13 @@
+if [ "${DRUPAL_CONFIGURE}" == "y" ] && [ "${DRUPAL_VER}" == "older" ]; then
+ message ""
+ message "This spell makes an assumption, which may not be accurate in your"
+ message "case, and sets the '\$base_url' variable in "
+ message "${INSTALL_ROOT}${DRUPAL_INSTALL_PATH}/${SPELL}/sites/default/settings.php"
+ message "to 'http://localhost/${SPELL}'."
+ message ""
+ message "If that is not correct for your situation, you will need to change"
+ message "that variable in that file."
+ message ""
+fi &&
+
+persistent_remove MYSQL_PASSWORD
diff --git a/collab/drupal/HISTORY b/collab/drupal/HISTORY
index ada9aba6f7..d6ffa78253 100644
--- a/collab/drupal/HISTORY
+++ b/collab/drupal/HISTORY
@@ -1,9 +1,12 @@
2006-06-13 Jason Flatt <jflatt@sourcemage.org>
* CONFIGURE: Added check for existing install that was in PREPARE.
+ Added a query for MySQL's root password.
* FINAL: Added check for Drupal version before displaying message.
+ Added persistent_remove to not keep the MySQL password lying around.
* INSTALL: Modified the parts that create the database and modify the
settings.php file to take into account the two Drupal versions and
the two possible database choices.
+ Added the password to the MySQL database activities.
* PREPARE: Changed the order for version install so that the more
current version is the default.
Removed warning and automatic exit so spell will complete it's cast
diff --git a/collab/drupal/INSTALL b/collab/drupal/INSTALL
index ce4a894f1c..21b52fa171 100755
--- a/collab/drupal/INSTALL
+++ b/collab/drupal/INSTALL
@@ -4,12 +4,12 @@ if [ "${DRUPAL_INSTALLED}" == "n" ]; then
if [ "${DRUPAL_CREATEDB}" == "y" ]; then
case "${DRUPAL_DATABASE_ENGINE}" in
mysql)
- message "${MESSAGE_COLOR}Creating MySQL database...${DEFAULT_COLOR}"
- mysqladmin create ${DRUPAL_DATABASE_NAME} &&
+ message "${MESSAGE_COLOR}Creating and updating MySQL database...${DEFAULT_COLOR}"
+ mysqladmin --password=${MYSQL_PASSWORD} create ${DRUPAL_DATABASE_NAME} &&
echo "GRANT ALL PRIVILEGES ON ${DRUPAL_DATABASE_NAME}.* \
TO ${DRUPAL_DATABASE_USER}@${DRUPAL_DATABASE_HOST} IDENTIFIED BY '${DRUPAL_DATABASE_PASSWORD}'; \
flush privileges; \
- \q " | mysql ${DRUPAL_DATABASE_NAME} &&
+ \q " | mysql --password=${MYSQL_PASSWORD} --database=${DRUPAL_DATABASE_NAME} &&
#
# Return true as this will fail if the database already exists
#
@@ -17,12 +17,12 @@ if [ "${DRUPAL_INSTALLED}" == "n" ]; then
if [ "`mysql -V | cut -d" " -f6 | cut -d"." -f1`" > "4" ] ||
[ "`mysql -V | cut -d" " -f6 | cut -d"." -f1`" == "4" ] &&
[ "`mysql -V | cut -d" " -f6 | cut -d"." -f2`" > "0" ]; then
- mysql ${DRUPAL_DATABASE_NAME} < database/database.4.1.mysql || true
+ mysql --password=${MYSQL_PASSWORD} ${DRUPAL_DATABASE_NAME} < database/database.4.1.mysql || true
else
- mysql ${DRUPAL_DATABASE_NAME} < database/database.4.0.mysql || true
+ mysql --password=${MYSQL_PASSWORD} ${DRUPAL_DATABASE_NAME} < database/database.4.0.mysql || true
fi
else
- mysql ${DRUPAL_DATABASE_NAME} < database/database.mysql || true
+ mysql --password=${MYSQL_PASSWORD} ${DRUPAL_DATABASE_NAME} < database/database.mysql || true
fi
;;