mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Deb: Fix blocksize check to use $mysql_datadir/$datadir correctly
In commit f99a8918 this line was changed to not use awk, and new version
copied both to init file and preinst file but overlooking that they use
different variable names.
Also fix minor syntax issues to make Shellcheck happy.
All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer
Amazon Web Services, Inc.
This commit is contained in:
committed by
Daniel Black
parent
ce547cfc05
commit
ea66df2f45
2
debian/mariadb-server-10.6.mariadb.init
vendored
2
debian/mariadb-server-10.6.mariadb.init
vendored
@@ -86,7 +86,7 @@ sanity_checks() {
|
||||
datadir=`mariadbd_get_param datadir`
|
||||
# As preset blocksize of GNU df is 1024 then available bytes is $df_available_blocks * 1024
|
||||
# 4096 blocks is then lower than 4 MB
|
||||
df_available_blocks=`LC_ALL=C BLOCKSIZE= df --output=avail "$datadir" | tail -n 1`
|
||||
df_available_blocks="$(LC_ALL=C BLOCKSIZE='' df --output=avail "$datadir" | tail -n 1)"
|
||||
if [ "$df_available_blocks" -lt "4096" ]; then
|
||||
log_failure_msg "$0: ERROR: The partition with $datadir is too full!"
|
||||
echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER
|
||||
|
||||
2
debian/mariadb-server-10.6.preinst
vendored
2
debian/mariadb-server-10.6.preinst
vendored
@@ -226,7 +226,7 @@ fi
|
||||
|
||||
# As preset blocksize of GNU df is 1024 then available bytes is $df_available_blocks * 1024
|
||||
# 4096 blocks is then lower than 4 MB
|
||||
df_available_blocks=`LC_ALL=C BLOCKSIZE= df --output=avail "$datadir" | tail -n 1`
|
||||
df_available_blocks="$(LC_ALL=C BLOCKSIZE='' df --output=avail "$mysql_datadir" | tail -n 1)"
|
||||
if [ "$df_available_blocks" -lt "4096" ]
|
||||
then
|
||||
echo "ERROR: There's not enough space in $mysql_datadir/" 1>&2
|
||||
|
||||
Reference in New Issue
Block a user