forked from ungleich-public/cdist
Fix shellcheck bits-n-bobs
This commit is contained in:
parent
3020ee91c2
commit
f281a5930b
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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" ]
|
||||
|
|
|
@ -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" ]
|
||||
|
|
Loading…
Reference in a new issue