From 0e55d390e3be4ecebafc4cebbe809409aeb67f91 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 28 Apr 2021 13:46:26 -0400 Subject: [PATCH] Fix up post output to console --- confluent_osdeploy/el7/profiles/default/scripts/post.sh | 2 +- .../el7/profiles/default/scripts/prechroot.sh | 6 +++++- confluent_osdeploy/el8/profiles/default/scripts/post.sh | 2 +- .../el8/profiles/default/scripts/prechroot.sh | 6 +++++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/confluent_osdeploy/el7/profiles/default/scripts/post.sh b/confluent_osdeploy/el7/profiles/default/scripts/post.sh index 745bd75c..10448f13 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/el7/profiles/default/scripts/post.sh @@ -1,5 +1,5 @@ #!/bin/sh -tail -f ${0}.log >& /dev/tty & +tail -f /tmp/nochroot/${0}.log >& /dev/tty & # need to copy over ssh key info nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}') apikey=$(cat /etc/confluent/confluent.apikey) diff --git a/confluent_osdeploy/el7/profiles/default/scripts/prechroot.sh b/confluent_osdeploy/el7/profiles/default/scripts/prechroot.sh index 44d42402..b3082e46 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/prechroot.sh +++ b/confluent_osdeploy/el7/profiles/default/scripts/prechroot.sh @@ -13,7 +13,11 @@ cp -a /etc/confluent /mnt/sysimage/etc chmod -R og-rwx /mnt/sysimage/etc/confluent cp /tmp/functions /mnt/sysimage/etc/confluent/ . /tmp/functions -cp /tmp/cryptboot /mnt/sysimage/tmp/ +if [ -f /tmp/cryptboot ]; then + cp /tmp/cryptboot /mnt/sysimage/tmp/ +fi +mkdir -p /mnt/sysimage/tmp/nochroot/tmp +mount -o bind,ro /tmp/ /mnt/sysimage/tmp/nochroot/tmp echo Port 2222 >> /etc/ssh/sshd_config.anaconda echo Match LocalPort 22 >> /etc/ssh/sshd_config.anaconda echo " ChrootDirectory /mnt/sysimage" >> /etc/ssh/sshd_config.anaconda diff --git a/confluent_osdeploy/el8/profiles/default/scripts/post.sh b/confluent_osdeploy/el8/profiles/default/scripts/post.sh index 745bd75c..10448f13 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/el8/profiles/default/scripts/post.sh @@ -1,5 +1,5 @@ #!/bin/sh -tail -f ${0}.log >& /dev/tty & +tail -f /tmp/nochroot/${0}.log >& /dev/tty & # need to copy over ssh key info nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}') apikey=$(cat /etc/confluent/confluent.apikey) diff --git a/confluent_osdeploy/el8/profiles/default/scripts/prechroot.sh b/confluent_osdeploy/el8/profiles/default/scripts/prechroot.sh index 44d42402..b3082e46 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/prechroot.sh +++ b/confluent_osdeploy/el8/profiles/default/scripts/prechroot.sh @@ -13,7 +13,11 @@ cp -a /etc/confluent /mnt/sysimage/etc chmod -R og-rwx /mnt/sysimage/etc/confluent cp /tmp/functions /mnt/sysimage/etc/confluent/ . /tmp/functions -cp /tmp/cryptboot /mnt/sysimage/tmp/ +if [ -f /tmp/cryptboot ]; then + cp /tmp/cryptboot /mnt/sysimage/tmp/ +fi +mkdir -p /mnt/sysimage/tmp/nochroot/tmp +mount -o bind,ro /tmp/ /mnt/sysimage/tmp/nochroot/tmp echo Port 2222 >> /etc/ssh/sshd_config.anaconda echo Match LocalPort 22 >> /etc/ssh/sshd_config.anaconda echo " ChrootDirectory /mnt/sysimage" >> /etc/ssh/sshd_config.anaconda