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 # Figure out the current state
# Not an explorer, as otherwise there'd be issues around the dependencies # 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 then
state_is="present" state_is="present"
else else

View file

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

View file

@ -45,13 +45,13 @@ fi
# Current state # Current state
# Not an exploerer, to avoid issues with mysql not installed YET # 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" ] if [ -n "$check_user" ]
then then
if [ -n "$password" ] if [ -n "$password" ]
then 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 fi
if [ -n "$password" ] && [ -z "$check_password" ] if [ -n "$password" ] && [ -z "$check_password" ]