diff --git a/confluent_osdeploy/el7/profiles/default/scripts/functions b/confluent_osdeploy/el7/profiles/default/scripts/functions index 16554d06..3fc93c4f 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/functions +++ b/confluent_osdeploy/el7/profiles/default/scripts/functions @@ -1,3 +1,4 @@ +#!/bin/bash function set_confluent_vars() { if [ -z "$nodename" ]; then nodename=$(grep ^NODENAME: /etc/confluent/confluent.info | awk '{print $2}') @@ -134,3 +135,5 @@ run_remote_config() { return } +#If invoked as a command, use the arguments to actually run a function +(return 0 2>/dev/null) || $1 "${@:2}" \ No newline at end of file diff --git a/confluent_osdeploy/el8-diskless/profiles/default/scripts/functions b/confluent_osdeploy/el8-diskless/profiles/default/scripts/functions index 0fa16eec..3fbfc0b1 100644 --- a/confluent_osdeploy/el8-diskless/profiles/default/scripts/functions +++ b/confluent_osdeploy/el8-diskless/profiles/default/scripts/functions @@ -1,3 +1,4 @@ +#!/bin/bash function test_mgr() { if curl -s https://${1}/confluent-api/ > /dev/null; then return 0 @@ -169,4 +170,5 @@ run_remote_config() { echo '---------------------------------------------------------------------------' return } - +#If invoked as a command, use the arguments to actually run a function +(return 0 2>/dev/null) || $1 "${@:2}" \ No newline at end of file diff --git a/confluent_osdeploy/el8/profiles/default/scripts/functions b/confluent_osdeploy/el8/profiles/default/scripts/functions index 08f2bdaa..65fd0ddd 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/functions +++ b/confluent_osdeploy/el8/profiles/default/scripts/functions @@ -1,3 +1,4 @@ +#!/bin/bash function test_mgr() { if curl -s https://${1}/confluent-api/ > /dev/null; then return 0 @@ -161,4 +162,5 @@ run_remote_config() { echo '---------------------------------------------------------------------------' return } - +#If invoked as a command, use the arguments to actually run a function +(return 0 2>/dev/null) || $1 "${@:2}" \ No newline at end of file diff --git a/confluent_osdeploy/genesis/profiles/default/scripts/functions b/confluent_osdeploy/genesis/profiles/default/scripts/functions index dc21e281..3f305fc0 100644 --- a/confluent_osdeploy/genesis/profiles/default/scripts/functions +++ b/confluent_osdeploy/genesis/profiles/default/scripts/functions @@ -1,3 +1,4 @@ +#!/bin/bash function test_mgr() { if curl -s https://${1}/confluent-api/ > /dev/null; then return 0 @@ -111,3 +112,6 @@ run_remote_config() { echo '---------------------------------------------------------------------------' return } + +#If invoked as a command, use the arguments to actually run a function +(return 0 2>/dev/null) || $1 "${@:2}" \ No newline at end of file diff --git a/confluent_osdeploy/suse15-diskless/profiles/default/scripts/functions b/confluent_osdeploy/suse15-diskless/profiles/default/scripts/functions index 0fa16eec..670ae9b8 100644 --- a/confluent_osdeploy/suse15-diskless/profiles/default/scripts/functions +++ b/confluent_osdeploy/suse15-diskless/profiles/default/scripts/functions @@ -1,3 +1,4 @@ +#!/bin/bash function test_mgr() { if curl -s https://${1}/confluent-api/ > /dev/null; then return 0 @@ -170,3 +171,5 @@ run_remote_config() { return } +#If invoked as a command, use the arguments to actually run a function +(return 0 2>/dev/null) || $1 "${@:2}" \ No newline at end of file diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/functions b/confluent_osdeploy/suse15/profiles/hpc/scripts/functions index d0ccafe9..30e4a7b2 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/functions +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/functions @@ -1,3 +1,4 @@ +#!/bin/bash function test_mgr() { if curl -s https://${1}/confluent-api/ > /dev/null; then return 0 @@ -119,3 +120,5 @@ run_remote_config() { echo '---------------------------------------------------------------------------' return } +#If invoked as a command, use the arguments to actually run a function +(return 0 2>/dev/null) || $1 "${@:2}" diff --git a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/functions b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/functions index 7ddb0983..71f9f93d 100644 --- a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/functions +++ b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/functions @@ -1,3 +1,4 @@ +#!/bin/bash function test_mgr() { if curl -s https://${1}/confluent-api/ > /dev/null; then return 0 @@ -122,3 +123,5 @@ run_remote_config() { return } +#If invoked as a command, use the arguments to actually run a function +(return 0 2>/dev/null) || $1 "${@:2}" \ No newline at end of file