diff --git a/cdist/conf/type/__file/gencode-local b/cdist/conf/type/__file/gencode-local index c9e0fa2c..4caa6df6 100755 --- a/cdist/conf/type/__file/gencode-local +++ b/cdist/conf/type/__file/gencode-local @@ -67,8 +67,7 @@ DONE if [ "$upload_file" ]; then echo upload >> "$__messages_out" # IPv6 fix - echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$' - if [ $? -eq 0 ] + if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$') then my_target_host="[${__target_host}]" else diff --git a/cdist/conf/type/__jail_freebsd10/gencode-local b/cdist/conf/type/__jail_freebsd10/gencode-local index bdd0ffd7..8c1687a9 100755 --- a/cdist/conf/type/__jail_freebsd10/gencode-local +++ b/cdist/conf/type/__jail_freebsd10/gencode-local @@ -44,8 +44,7 @@ basepresent="$(cat "$__object/explorer/basepresent")" if [ "$state" = "present" ]; then if [ "$basepresent" = "NONE" ]; then # IPv6 fix - echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$' - if [ $? -eq 0 ] + if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$') then my_target_host="[${__target_host}]" else diff --git a/cdist/conf/type/__jail_freebsd9/gencode-local b/cdist/conf/type/__jail_freebsd9/gencode-local index ce9b215e..67420a6f 100755 --- a/cdist/conf/type/__jail_freebsd9/gencode-local +++ b/cdist/conf/type/__jail_freebsd9/gencode-local @@ -40,8 +40,7 @@ basepresent="$(cat "$__object/explorer/basepresent")" if [ "$state" = "present" ]; then if [ "$basepresent" = "NONE" ]; then # IPv6 fix - echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$' - if [ $? -eq 0 ] + if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$') then my_target_host="[${__target_host}]" else diff --git a/cdist/conf/type/__pf_ruleset/gencode-local b/cdist/conf/type/__pf_ruleset/gencode-local index d14a6045..2db2ae06 100644 --- a/cdist/conf/type/__pf_ruleset/gencode-local +++ b/cdist/conf/type/__pf_ruleset/gencode-local @@ -60,8 +60,7 @@ case $uname in esac # IPv6 fix -echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$' -if [ $? -eq 0 ] +if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$') then my_target_host="[${__target_host}]" else