summaryrefslogtreecommitdiff
path: root/packaging/rpm-oel/mysql_config.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/rpm-oel/mysql_config.sh')
-rw-r--r--packaging/rpm-oel/mysql_config.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/packaging/rpm-oel/mysql_config.sh b/packaging/rpm-oel/mysql_config.sh
new file mode 100644
index 00000000000..abe46e0ed74
--- /dev/null
+++ b/packaging/rpm-oel/mysql_config.sh
@@ -0,0 +1,28 @@
+#! /bin/bash
+#
+# Wrapper script for mysql_config to support multilib
+#
+# Only works on OEL6/RHEL6 and similar
+#
+# This command respects setarch
+
+bits=$(rpm --eval %__isa_bits)
+
+case $bits in
+ 32|64) status=known ;;
+ *) status=unknown ;;
+esac
+
+if [ "$status" = "unknown" ] ; then
+ echo "$0: error: command 'rpm --eval %__isa_bits' returned unknown value: $bits"
+ exit 1
+fi
+
+
+if [ -x /usr/bin/mysql_config-$bits ] ; then
+ /usr/bin/mysql_config-$bits "$@"
+else
+ echo "$0: error: needed binary: /usr/bin/mysql_config-$bits is missing. Please check your MySQL installation."
+ exit 1
+fi
+