From 7068287ba3ea549eaf0293353164a57623a7b850 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 24 Feb 2022 10:25:59 -0500 Subject: [PATCH] Fix autocons spurious output --- .../usr/lib/dracut/hooks/cmdline/10-confluentdiskless.sh | 8 ++++---- .../usr/lib/dracut/hooks/pre-trigger/01-confluent.sh | 4 ++-- 2 files changed, 6 insertions(+), 6 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 c4dceb1c..9f03a248 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 @@ -132,15 +132,15 @@ while [ $ready = "0" ]; do elif grep 'SSL' $tmperr > /dev/null; then confluent_mgr=${confluent_mgr#[} confluent_mgr=${confluent_mgr%]} - sleep 1 - /opt/confluent/bin/autocons -c - echo 'Failure establishing TLS conneection to '$confluent_mgr' (try `osdeploy initialize -t` on the deployment server)' + /opt/confluent/bin/autocons -c > /dev/null + echo 'Failure establishing TLS conneection to '$confluent_mgr' (try `osdeploy initialize -t` on the deployment server)' + sleep 1 else ready=1 fi rm $tmperr done -if [ ! -z "$autocons" ] && grep textconsole: true /etc/confluent/confluent.deploycfg > /dev/null; then /opt/confluent/bin/autocons -c > /dev/null; fi +if [ ! -z "$autocons" ] && grep "textconsole: true" /etc/confluent/confluent.deploycfg > /dev/null; then /opt/confluent/bin/autocons -c > /dev/null; fi if [ -c /dev/tpmrm0 ]; then tpm2_pcrextend 15:sha256=2fbe96c50dde38ce9cd2764ddb79c216cfbcd3499568b1125450e60c45dd19f2 fi diff --git a/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/pre-trigger/01-confluent.sh b/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/pre-trigger/01-confluent.sh index cfa3bfb6..c6d45894 100644 --- a/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/pre-trigger/01-confluent.sh +++ b/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/pre-trigger/01-confluent.sh @@ -58,7 +58,7 @@ nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}') cat /tls/*.pem > /etc/confluent/ca.pem while ! confluentpython /opt/confluent/bin/apiclient /confluent-api/self/deploycfg2 > /etc/confluent/confluent.deploycfg; do - /opt/confluent/bin/autocons -c + /opt/confluent/bin/autocons -c > /dev/null sleep 1 done ifidx=$(cat /tmp/confluent.ifidx) @@ -95,8 +95,8 @@ if [ "$textconsole" = "true" ] && ! grep console= /proc/cmdline > /dev/null; the autocons=$(cat /tmp/01-autocons.devnode) if [ ! -z "$autocons" ]; then echo Auto-configuring installed system to use text console - /opt/confluent/bin/autocons -c echo Auto-configuring installed system to use text console > $autocons + /opt/confluent/bin/autocons -c > /dev/null cp /tmp/01-autocons.conf /etc/cmdline.d/ else echo "Unable to automatically detect requested text console"