summaryrefslogtreecommitdiff
path: root/debian/mariadb-galera-server-5.5.config
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2012-11-19 13:01:38 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2012-11-19 13:01:38 +0400
commitab6d729816b2877bfe76b7163b1322ac8b83153a (patch)
treee3dd706d18288f99eb90c983a28fd2d74706ceca /debian/mariadb-galera-server-5.5.config
parentc9c458fa6e2e215c783794b11b30ed3a27904383 (diff)
downloadmariadb-git-ab6d729816b2877bfe76b7163b1322ac8b83153a.tar.gz
MDEV-507 deb/rpm packages for galera builds.
Debian packaging, part II. Changes in the set of package-related files. Some were removed, some renamed, as we only keep the mariadb-galera-server package.
Diffstat (limited to 'debian/mariadb-galera-server-5.5.config')
-rw-r--r--debian/mariadb-galera-server-5.5.config46
1 files changed, 46 insertions, 0 deletions
diff --git a/debian/mariadb-galera-server-5.5.config b/debian/mariadb-galera-server-5.5.config
new file mode 100644
index 00000000000..162017caf71
--- /dev/null
+++ b/debian/mariadb-galera-server-5.5.config
@@ -0,0 +1,46 @@
+#!/bin/bash -e
+
+. /usr/share/debconf/confmodule
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
+
+CNF=/etc/mysql/my.cnf
+
+# Beware that there are two ypwhich one of them needs the 2>/dev/null!
+if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then
+ db_input high mysql-server-5.1/nis_warning || true
+ db_go
+fi
+
+# only ask this question on fresh installs, during "reconfiguration" and when
+# not upgrading from an existing 5.0 installation.
+# there is also an additional check for empty root passwords in the
+# postinst script when the tools are available for us to use.
+if [ "$1" = "configure" ] && ([ -z "$2" ] && [ ! -e "/var/lib/mysql/debian-5.0.flag" ] ) || [ "$1" = "reconfigure" ]; then
+ while :; do
+ RET=""
+ db_input high mysql-server/root_password || true
+ db_go
+ db_get mysql-server/root_password
+ # if password isn't empty we ask for password verification
+ if [ -z "$RET" ]; then
+ db_fset mysql-server/root_password seen false
+ db_fset mysql-server/root_password_again seen false
+ break
+ fi
+ ROOT_PW="$RET"
+ db_input high mysql-server/root_password_again || true
+ db_go
+ db_get mysql-server/root_password_again
+ if [ "$RET" == "$ROOT_PW" ]; then
+ ROOT_PW=''
+ break
+ fi
+ db_fset mysql-server/password_mismatch seen false
+ db_input critical mysql-server/password_mismatch
+ db_set mysql-server/root_password ""
+ db_set mysql-server/root_password_again ""
+ db_go
+ done
+fi