mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 11:45:32 +00:00
Merge 10.6 into 10.9
This commit is contained in:
18
debian/mariadb-server.mariadb.init
vendored
18
debian/mariadb-server.mariadb.init
vendored
@ -84,6 +84,24 @@ sanity_checks() {
|
||||
|
||||
# check for diskspace shortage
|
||||
datadir=`mariadbd_get_param datadir`
|
||||
|
||||
# If datadir location is not changed int configuration
|
||||
# then it's not printed with /usr/sbin/mariadbd --print-defaults
|
||||
# then we use 'sane' default.
|
||||
if [ -z "$datadir"]
|
||||
then
|
||||
datadir="/var/lib/mysql"
|
||||
fi
|
||||
|
||||
# Check if there datadir location is available and
|
||||
# fail if it's not
|
||||
if [ ! -d "$datadir" ]
|
||||
then
|
||||
log_failure_msg "$0: ERROR: Can't locate MariaDB installation location $datadir"
|
||||
echo "ERROR: Can't locate MariaDB installation location $datadir" | $ERR_LOGGER
|
||||
exit 1
|
||||
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)"
|
||||
|
Reference in New Issue
Block a user