Add is_ubuntu function

This replaces all of the [[ "$os_PACKAGE" = "deb" ]] tests, except when
those tests are before straight calls to dpkg.

Change-Id: I8a3ebf1b1bc5a55d736f9258d5ba1d24dabf04ea
This commit is contained in:
Vincent Untz
2012-12-04 12:36:34 +01:00
parent 1cd8a4725b
commit c18b965152
9 changed files with 37 additions and 44 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ function recreate_database_mysql {
function configure_database_mysql {
echo_summary "Configuring and starting MySQL"
if [[ "$os_PACKAGE" = "deb" ]]; then
if is_ubuntu; then
MY_CONF=/etc/mysql/my.cnf
MYSQL=mysql
else
@@ -61,7 +61,7 @@ default-storage-engine = InnoDB" $MY_CONF
}
function install_database_mysql {
if [[ "$os_PACKAGE" = "deb" ]]; then
if is_ubuntu; then
# Seed configuration with mysql password so that apt-get install doesn't
# prompt us for a password upon install.
cat <<MYSQL_PRESEED | sudo debconf-set-selections