Skip to content

Commit

Permalink
MARIADB_DISABLE_UPGRADE_BACKUP to take non-empty value
Browse files Browse the repository at this point in the history
Like all the other environment variables.

Closes MariaDB#441.
  • Loading branch information
grooverdan committed Jun 17, 2022
1 parent 8b743f5 commit d17582b
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 27 deletions.
5 changes: 2 additions & 3 deletions 10.10/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,8 @@ docker_setup_db() {
# backup the mysql database
docker_mariadb_backup_system()
{
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \
&& [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then
mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting"
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then
mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting"
return
fi
local backup_db="system_mysql_backup_unknown_version.sql.zst"
Expand Down
5 changes: 2 additions & 3 deletions 10.3/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,8 @@ docker_setup_db() {
# backup the mysql database
docker_mariadb_backup_system()
{
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \
&& [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then
mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting"
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then
mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting"
return
fi
local backup_db="system_mysql_backup_unknown_version.sql.zst"
Expand Down
5 changes: 2 additions & 3 deletions 10.4/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,8 @@ docker_setup_db() {
# backup the mysql database
docker_mariadb_backup_system()
{
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \
&& [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then
mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting"
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then
mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting"
return
fi
local backup_db="system_mysql_backup_unknown_version.sql.zst"
Expand Down
5 changes: 2 additions & 3 deletions 10.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,8 @@ docker_setup_db() {
# backup the mysql database
docker_mariadb_backup_system()
{
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \
&& [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then
mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting"
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then
mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting"
return
fi
local backup_db="system_mysql_backup_unknown_version.sql.zst"
Expand Down
5 changes: 2 additions & 3 deletions 10.6/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,8 @@ docker_setup_db() {
# backup the mysql database
docker_mariadb_backup_system()
{
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \
&& [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then
mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting"
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then
mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting"
return
fi
local backup_db="system_mysql_backup_unknown_version.sql.zst"
Expand Down
5 changes: 2 additions & 3 deletions 10.7/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,8 @@ docker_setup_db() {
# backup the mysql database
docker_mariadb_backup_system()
{
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \
&& [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then
mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting"
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then
mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting"
return
fi
local backup_db="system_mysql_backup_unknown_version.sql.zst"
Expand Down
5 changes: 2 additions & 3 deletions 10.8/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,8 @@ docker_setup_db() {
# backup the mysql database
docker_mariadb_backup_system()
{
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \
&& [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then
mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting"
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then
mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting"
return
fi
local backup_db="system_mysql_backup_unknown_version.sql.zst"
Expand Down
5 changes: 2 additions & 3 deletions 10.9/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,8 @@ docker_setup_db() {
# backup the mysql database
docker_mariadb_backup_system()
{
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \
&& [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then
mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting"
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then
mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting"
return
fi
local backup_db="system_mysql_backup_unknown_version.sql.zst"
Expand Down
5 changes: 2 additions & 3 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,8 @@ docker_setup_db() {
# backup the mysql database
docker_mariadb_backup_system()
{
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \
&& [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then
mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting"
if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then
mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting"
return
fi
local backup_db="system_mysql_backup_unknown_version.sql.zst"
Expand Down

0 comments on commit d17582b

Please sign in to comment.