From 7da29c17e1c00229f80c981313df31beb802c62f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 3 Jun 2020 15:33:10 -0400 Subject: [PATCH] Try to add error on encryptboot for SUSE We don't support under suse, so let the user know if they try. --- .../suse15/initramfs/opt/confluent/bin/suseagent | 1 + confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/confluent_osdeploy/suse15/initramfs/opt/confluent/bin/suseagent b/confluent_osdeploy/suse15/initramfs/opt/confluent/bin/suseagent index 54ba12fc..a189bd36 100755 --- a/confluent_osdeploy/suse15/initramfs/opt/confluent/bin/suseagent +++ b/confluent_osdeploy/suse15/initramfs/opt/confluent/bin/suseagent @@ -53,6 +53,7 @@ if [ "$textconsole" = "true" ] && ! grep console= /proc/cmdline > /dev/null && [ echo "install progress may be checked by using ssh to access and run the screendump command" > ${autocons%,*} echo "Install time serial console would require the profile to have console=${autocons#/dev/}" > ${autocons%,*} echo "specified in the kernel command line arguments" > ${autocons%,*} + echo ${autocons%,*} > /tmp/autoconsdev sed -e s'/$/ 'console=${autocons#*/dev/}/ /proc/cmdline > /etc/fakecmdline mount -o bind /etc/fakecmdline /proc/cmdline echo "ConsoleDevice: ${autocons%,*}" >> /etc/linuxrc.d/01-confluent diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh b/confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh index d8866be2..ec5ee3a4 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh @@ -8,6 +8,12 @@ rootpw=$(grep rootpassword: /tmp/confluent.deploycfg|sed -e 's/^rootpassword: // if [ "$rootpw" = "null" ]; then rootpw="!" fi +cryptboot=$(grep encryptboot: /tmp/confluent.deploycfg|sed -e 's/^encryptboot: //') +if [ "$cryptboot" != "" ] && [ "$cryptboot" != "none" ] && [ "$cryptboot" != "null" ]; then + echo "Encrypted boot requested, but not implemented for this OS" > /dev/console + if [ -f '/tmp/autoconsdev' ]; then echo "Encryptod boot requested, but not implemented for this OS" >> $(cat /tmp/autoconsdev) + while :; do sleep 86400; done +fi mkdir ~/.ssh cat /ssh/*.rootpubkey > ~/.ssh/authorized_keys