diff --git a/confluent_osdeploy/ubuntu22.04/initramfs/scripts/casper-bottom/99confluent b/confluent_osdeploy/ubuntu22.04/initramfs/scripts/casper-bottom/99confluent index c90d507b..ef385a30 100755 --- a/confluent_osdeploy/ubuntu22.04/initramfs/scripts/casper-bottom/99confluent +++ b/confluent_osdeploy/ubuntu22.04/initramfs/scripts/casper-bottom/99confluent @@ -11,7 +11,10 @@ MGR=$(grep ^MANAGER: /custom-installation/confluent/confluent.info|head -n 1| aw MGTIFACE=$(grep $MGR /custom-installation/confluent/confluent.info | grep ^EXTMGRINFO: | head -n 1 | awk -F'|' '{print $2}') oum=$(umask) umask 077 +deploycfg=/root/custom-installation/confluent/confluent.deploycfg +netcfgfile=$deploycfg if [ -e /tmp/cnflnthmackeytmp ]; then + netcfgfile=/tmp/idnttmp hmackeyfile=/tmp/cnflnthmackeytmp #echo -n $(grep ^apitoken: /tmp/identdata/cnflnt.yml|awk '{print $2}') > $hmackeyfile passfile=/tmp/cnflnttmppassfile @@ -26,7 +29,6 @@ else chroot . custom-installation/confluent/bin/clortho $NODENAME $MGR > /root/custom-installation/confluent/confluent.apikey MGR=[$MGR] fi -deploycfg=/root/custom-installation/confluent/confluent.deploycfg if [ -z "$MGTIFACE" ]; then chroot . usr/bin/curl -f -H "CONFLUENT_NODENAME: $NODENAME" -H "CONFLUENT_APIKEY: $(cat /root//custom-installation/confluent/confluent.apikey)" https://${MGR}/confluent-api/self/deploycfg > $deploycfg else @@ -36,20 +38,20 @@ umask $oum nic=$(grep ^MANAGER /custom-installation/confluent/confluent.info|grep fe80::|sed -e s/.*%//|head -n 1) nic=$(ip link |grep ^$nic:|awk '{print $2}') DEVICE=${nic%:} -ipv4m=$(grep ^ipv4_method $deploycfg|awk '{print$2}') +ipv4m=$(grep ^ipv4_method $netcfgfile|awk '{print$2}') . /scripts/functions if [ "$ipv4m" = "dhcp" ]; then IP=dhcp configure_networking elif [ "$ipv4m" = "static" ]; then - v4addr=$(grep ^ipv4_address: $deploycfg) + v4addr=$(grep ^ipv4_address: $netcfgfile) v4addr=${v4addr#ipv4_address: } - v4gw=$(grep ^ipv4_gateway: $deploycfg) + v4gw=$(grep ^ipv4_gateway: $netcfgfile) v4gw=${v4gw#ipv4_gateway: } if [ "$v4gw" = "null" ]; then v4gw="" fi - v4nm=$(grep ipv4_netmask: $deploycfg) + v4nm=$(grep ipv4_netmask: $netcfgfile) v4nm=${v4nm#ipv4_netmask: } dnsdomain=$(grep ^dnsdomain: $deploycfg) dnsdomain=${dnsdomain#dnsdomain: }