From f281a5930b39e46ac3d7c3511916d0c3a9d66fec Mon Sep 17 00:00:00 2001 From: Daniel Fancsali Date: Wed, 5 May 2021 10:53:01 +0100 Subject: [PATCH] Fix shellcheck bits-n-bobs --- cdist/conf/type/__mysql_database/gencode-remote | 2 +- cdist/conf/type/__mysql_database/manifest | 2 +- cdist/conf/type/__mysql_user/gencode-remote | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cdist/conf/type/__mysql_database/gencode-remote b/cdist/conf/type/__mysql_database/gencode-remote index ad22cc6e..447b3d74 100755 --- a/cdist/conf/type/__mysql_database/gencode-remote +++ b/cdist/conf/type/__mysql_database/gencode-remote @@ -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 diff --git a/cdist/conf/type/__mysql_database/manifest b/cdist/conf/type/__mysql_database/manifest index af36cfb9..44c8c3ca 100755 --- a/cdist/conf/type/__mysql_database/manifest +++ b/cdist/conf/type/__mysql_database/manifest @@ -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" ] diff --git a/cdist/conf/type/__mysql_user/gencode-remote b/cdist/conf/type/__mysql_user/gencode-remote index 4fd1a049..a2bde7ad 100755 --- a/cdist/conf/type/__mysql_user/gencode-remote +++ b/cdist/conf/type/__mysql_user/gencode-remote @@ -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" ]