diff --git a/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/cmdline/01-confluent.sh b/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/cmdline/01-confluent.sh index d3e43f6c..25ba8e61 100644 --- a/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/cmdline/01-confluent.sh +++ b/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/cmdline/01-confluent.sh @@ -4,8 +4,10 @@ cat /tls/*.0 >> /etc/pki/tls/certs/ca-bundle.crt if ! grep console= /proc/cmdline >& /dev/null; then autocons=$(/opt/confluent/bin/autocons) if [ -n "$autocons" ]; then - echo console=$autocons |sed -e 's!/dev/!!' >> /etc/cmdline.d/01-autocons.conf + echo console=$autocons |sed -e 's!/dev/!!' >> /tmp/01-autocons.conf autocons=${autocons%,*} + echo $autocons > /tmp/01-autocons.devnode + echo "Detected firmware specified console at $(cat /tmp/01-autocons.conf)" > $autocons echo "Initializing auto detected console when installer starts" > $autocons fi fi diff --git a/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/initqueue/01-confluent.sh b/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/initqueue/01-confluent.sh index 37688e66..43622dbc 100644 --- a/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/initqueue/01-confluent.sh +++ b/confluent_osdeploy/el8/initramfs/usr/lib/dracut/hooks/initqueue/01-confluent.sh @@ -38,6 +38,19 @@ profilename=$(grep ^profile: /tmp/confluent.deploycfg) profilename=${profilename#profile: } proto=$(grep ^protocol: /tmp/confluent.deploycfg) proto=${proto#protocol: } +textconsole=$(grep ^textconsole: /tmp/confluent.deploycfg) +textconsole=${textconsole#textconsole: } +if [ $textconsole = "true" ] && ! grep console= /proc/cmdline > /dev/null; then + autocons=$(cat /tmp/01-autocons.devnode) + if [ ! -z "$autocons" ]; then + echo Auto-configuring installed system to use text console + echo Auto-configuring installed system to use text console > $autocons + cp /tmp/01-autocons.conf /etc/cmdline.d/ + else + echo "Unable to automatically detect requested text console" + fi +fi + echo inst.repo=$proto://$mgr/confluent-public/os/$profilename/distribution >> /etc/cmdline.d/01-confluent.conf echo inst.ks=$proto://$mgr/confluent-public/os/$profilename/kickstart >> /etc/cmdline.d/01-confluent.conf kickstart=$proto://$mgr/confluent-public/os/$profilename/kickstart