Skip to content

Commit

Permalink
MDEV-33750: Remove seq in Debian init.d for-loop
Browse files Browse the repository at this point in the history
Make all init.d script for loops to use new
{1..5} syntax and rework one not to use seq as
all the rest use new Bash syntax.
  • Loading branch information
illuusio committed May 8, 2024
1 parent 6d62406 commit 13aefed
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion debian/mariadb-server.mariadb.init
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,21 @@ case "${1:-''}" in
# Start MariaDB!
/usr/bin/mariadbd-safe "${@:2}" 2>&1 >/dev/null | $ERR_LOGGER &

for _ in $(seq 1 "${MYSQLD_STARTUP_TIMEOUT:-30}")
# Make sure that there is some default
# 30 seconds is fine default for starting
# maximum is one hour if there is gigantic
# database
if [ -z "${MYSQLD_STARTUP_TIMEOUT}" ]
then
MYSQLD_STARTUP_TIMEOUT=30
fi

for i in {1..3600}
do
if [ "${i}" -gt "${MYSQLD_STARTUP_TIMEOUT}" ]
then
break
fi
sleep 1
if mariadbd_status check_alive nowarn
then
Expand Down

0 comments on commit 13aefed

Please sign in to comment.