From 09db9f5a25a7ed13a6cc61dfba894da83d7cc43f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 11 Jun 2020 10:29:22 -0400 Subject: [PATCH] Pull ks.cfg manipulation into scripts This make it easier to customize rather than being in addons.tgz --- confluent_osdeploy/esxi7/initramfs/bin/dcuiweasel | 11 ++++------- .../esxi7/profiles/hypervisor/scripts/modinstall | 7 +++++++ 2 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 confluent_osdeploy/esxi7/profiles/hypervisor/scripts/modinstall diff --git a/confluent_osdeploy/esxi7/initramfs/bin/dcuiweasel b/confluent_osdeploy/esxi7/initramfs/bin/dcuiweasel index dc436ff2..af361c1d 100644 --- a/confluent_osdeploy/esxi7/initramfs/bin/dcuiweasel +++ b/confluent_osdeploy/esxi7/initramfs/bin/dcuiweasel @@ -18,10 +18,7 @@ cat /tls/*.pem > /etc/confluent/ca.pem /opt/confluent/bin/apiclient /confluent-api/self/deploycfg > /etc/confluent/confluent.deploycfg profile=$(grep ^profile: /etc/confluent/confluent.deploycfg | sed -e 's/^profile: //') /opt/confluent/bin/apiclient /confluent-public/os/$profile/kickstart > /etc/confluent/ks.cfg -/opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/makeksnet >> /tmp/makeksnet -chmod +x /tmp/makeksnet -/tmp/makeksnet >> /etc/confluent/ks.cfg -rootpw=$(grep ^rootpassword: /etc/confluent/confluent.deploycfg|sed -e 's/^rootpassword: //') -echo rootpw --iscrypted $rootpw >> /etc/confluent/ks.cfg -export BOOT_CMDLINE=ks=/etc/confluent/ks.cfg -/bin/install +/opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/modinstall > /tmp/modinstall +export node mgr profile +. /tmp/modinstall +exec /bin/install diff --git a/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/modinstall b/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/modinstall new file mode 100644 index 00000000..45c2a954 --- /dev/null +++ b/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/modinstall @@ -0,0 +1,7 @@ +#!/bin/sh +/opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/makeksnet >> /tmp/makeksnet +chmod +x /tmp/makeksnet +/tmp/makeksnet >> /etc/confluent/ks.cfg +rootpw=$(grep ^rootpassword: /etc/confluent/confluent.deploycfg|sed -e 's/^rootpassword: //') +echo rootpw --iscrypted $rootpw >> /etc/confluent/ks.cfg +export BOOT_CMDLINE=ks=/etc/confluent/ks.cfg