From 8deadec7a6494670f9ef24bd0c5eb75b6fbfd983 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 17 May 2022 10:44:07 -0400 Subject: [PATCH] Provide hook to override rungesis Some applications may want much of the genesis distribution, but want to have a bootstrap process independent of confluent. Provide hooks either through the identity image or the boot image itself. --- .../genesis/initramfs/opt/confluent/bin/rungenesis | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis b/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis index 2e888928..ff5c9209 100644 --- a/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis +++ b/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis @@ -43,6 +43,20 @@ mkdir -p /etc/pki/tls/certs cat /tls/*.pem > /etc/pki/tls/certs/ca-bundle.crt TRIES=0 touch /etc/confluent/confluent.info +if [ -e /dev/disk/by-label/CNFLNT_IDNT ]; then + mkdir -p /media/ident + mount /dev/disk/by-label/CNFLNT_IDNT /media/ident + if [ -e /media/ident/genesis_bootstrap.sh ]; then + exec sh /media/ident/genesis_bootstrap.sh + fi +fi +if [ -e /dev/disk/by-label/GENESIS-X86 ]; then + mkdir -p /media/genesis + mount /dev/disk/by-label/GENESIS-X86 /media/genesis + if [ -e /media/genesis/genesis_bootstrap.sh ]; then + exec sh /media/genesis/genesis_bootstrap.sh + fi +fi cd /sys/class/net echo -n "Scanning for network configuration..." while ! grep ^EXTMGRINFO: /etc/confluent/confluent.info | awk -F'|' '{print $3}' | grep 1 >& /dev/null && [ "$TRIES" -lt 30 ]; do