Fix shellcheck bits-n-bobs

This commit is contained in:
fancsali 2021-05-05 10:53:01 +01:00
parent 3020ee91c2
commit f281a5930b
3 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ fi
# Figure out the current state
# Not an explorer, as otherwise there'd be issues around the dependencies
if [ -n "$( $__remote_exec $__target_host "mysql -B -N -e \"show databases like '$name'\"" )" ]
if [ -n "$( $__remote_exec "$__target_host" "mysql -B -N -e \"show databases like '$name'\"" )" ]
then
state_is="present"
else

View File

@ -20,7 +20,7 @@
# Whatever the details, we'll need MySQL/MariaDB
require="__mysql" __nop $__object_id
require="__mysql" __nop "$__object_id"
if [ -f "$__object/parameter/user" ]

View File

@ -45,13 +45,13 @@ fi
# Current state
# Not an exploerer, to avoid issues with mysql not installed YET
check_user="$( $__remote_exec $__target_host "mysql -B -N -e \"select user from mysql.user where user = '$name' and host = '$host'\"" )"
check_user="$( $__remote_exec "$__target_host" "mysql -B -N -e \"select user from mysql.user where user = '$name' and host = '$host'\"" )"
if [ -n "$check_user" ]
then
if [ -n "$password" ]
then
check_password="$( $__remote_exec $__target_host "mysql -B -N -e \"select user from mysql.user where user = '$name' and host = '$host' and password = password( '$password' )\"" )"
check_password="$( $__remote_exec "$__target_host" "mysql -B -N -e \"select user from mysql.user where user = '$name' and host = '$host' and password = password( '$password' )\"" )"
fi
if [ -n "$password" ] && [ -z "$check_password" ]