From 6aaeb9b91031f46410178d20069331eed922c2c1 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 11 Aug 2020 10:14:34 -0400 Subject: [PATCH] Have a genesis profile to latch onto --- .../profiles/default/scripts/functions | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 confluent_osdeploy/genesis/profiles/default/scripts/functions diff --git a/confluent_osdeploy/genesis/profiles/default/scripts/functions b/confluent_osdeploy/genesis/profiles/default/scripts/functions new file mode 100644 index 00000000..56a41eec --- /dev/null +++ b/confluent_osdeploy/genesis/profiles/default/scripts/functions @@ -0,0 +1,19 @@ +run_remote() { + cd $(mktemp -d) + curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 + chmod +x $1 + cmd=$1 + if [ -x /usr/bin/chcon ]; then + chcon system_u:object_r:bin_t:s0 $cmd + fi + shift + ./$cmd $* + cd - +} + +run_remote_python() { + cd $(mktemp -d) + curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 + /usr/libexec/platform-python $* + cd - +}