From ef43d9116416b920808f558c734eed4aaf869732 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 12 Aug 2021 15:20:43 -0400 Subject: [PATCH] Have diskless environment prefer 'primary' interface too --- .../usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh | 5 ++++- .../lib/dracut/hooks/cmdline/10-confluentdiskless.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/confluent_osdeploy/el8-diskless/initramfs/usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh b/confluent_osdeploy/el8-diskless/initramfs/usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh index 29adbcc9..1b2ef09e 100644 --- a/confluent_osdeploy/el8-diskless/initramfs/usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh +++ b/confluent_osdeploy/el8-diskless/initramfs/usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh @@ -101,7 +101,10 @@ done cd / nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}') hostname $nodename -confluent_mgr=$(grep ^MANAGER: /etc/confluent/confluent.info|head -n 1 | awk '{print $2}') +confluent_mgr=$(grep '^EXTMGRINFO:.*1$' /etc/confluent/confluent.info | awk -F': ' '{print $2}' | awk -F'|' '{print $1}') +if [ -z "$confluent_mgr" ]; then + confluent_mgr=$(grep ^MANAGER: /etc/confluent/confluent.info|head -n 1 | awk '{print $2}') +fi if [[ $confluent_mgr == *%* ]]; then echo $confluent_mgr | awk -F% '{print $2}' > /tmp/confluent.ifidx ifidx=$(cat /tmp/confluent.ifidx) diff --git a/confluent_osdeploy/suse15-diskless/initramfs/lib/dracut/hooks/cmdline/10-confluentdiskless.sh b/confluent_osdeploy/suse15-diskless/initramfs/lib/dracut/hooks/cmdline/10-confluentdiskless.sh index a6d1c965..7271b6e9 100644 --- a/confluent_osdeploy/suse15-diskless/initramfs/lib/dracut/hooks/cmdline/10-confluentdiskless.sh +++ b/confluent_osdeploy/suse15-diskless/initramfs/lib/dracut/hooks/cmdline/10-confluentdiskless.sh @@ -102,7 +102,10 @@ done cd / nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}') hostname $nodename -confluent_mgr=$(grep ^MANAGER: /etc/confluent/confluent.info|head -n 1 | awk '{print $2}') +confluent_mgr=$(grep '^EXTMGRINFO:.*1$' /etc/confluent/confluent.info | awk -F': ' '{print $2}' | awk -F'|' '{print $1}') +if [ -z "$confluent_mgr" ]; then + confluent_mgr=$(grep ^MANAGER: /etc/confluent/confluent.info|head -n 1 | awk '{print $2}') +fi if [[ $confluent_mgr == *%* ]]; then echo $confluent_mgr | awk -F% '{print $2}' > /tmp/confluent.ifidx ifidx=$(cat /tmp/confluent.ifidx)