From c3b954a743a7e26566c8ebd0de4f337d09fd1de8 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 3 May 2021 14:50:04 -0400 Subject: [PATCH] Move suse15 to log like rhel --- confluent_osdeploy/suse15/profiles/hpc/scripts/firstboot.sh | 4 +++- confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh | 4 +++- confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh | 4 +++- confluent_osdeploy/suse15/profiles/hpc/scripts/prechroot.sh | 2 ++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/firstboot.sh b/confluent_osdeploy/suse15/profiles/hpc/scripts/firstboot.sh index a5466310..e4baab17 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/firstboot.sh +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/firstboot.sh @@ -1,6 +1,8 @@ -#!/bin/sh +#!/bin/bash # This script runs at the end of the final boot, updating status +exec >> /var/log/confluent/confluent-firstboot.log +exec 2>> /var/log/confluent/confluent-firstboot.log nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}') confluent_mgr=$(grep ^deploy_server /etc/confluent/confluent.deploycfg|awk '{print $2}') diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh b/confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh index ff871923..ba4f95c4 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/post.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # This script runs at the end of install in the installed system # but still under the installer kernel. @@ -9,6 +9,8 @@ # If there are dependencies on the kernel (drivers or special filesystems) # then firstboot.sh would be the script to customize. +exec >> /var/log/confluent/confluent-post.log +exec 2>> /var/log/confluent/confluent-post.log confluent_mgr=$(grep ^deploy_server /etc/confluent/confluent.deploycfg|awk '{print $2}') confluent_profile=$(grep ^profile: /etc/confluent/confluent.deploycfg|sed -e 's/^profile: //') nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}') diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh b/confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh index 14e6501d..b5764fb9 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh @@ -1,8 +1,10 @@ -#!/bin/sh +#!/bin/bash # This script runs before the installer executes, and sets up ssh during install as well # as rewriting the autoyast file with any substitutions prior to it being evaluated for real +exec >> /tmp/confluent-pre.log +exec 2>> /tmp/confluent-pre.log nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}') rootpw=$(grep rootpassword: /etc/confluent/confluent.deploycfg|sed -e 's/^rootpassword: //') if [ "$rootpw" = "null" ]; then diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/prechroot.sh b/confluent_osdeploy/suse15/profiles/hpc/scripts/prechroot.sh index e73de763..1f1396f1 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/prechroot.sh +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/prechroot.sh @@ -27,4 +27,6 @@ echo Port 2222 >> /etc/ssh/sshd_config echo Match LocalPort 22 >> /etc/ssh/sshd_config echo " ChrootDirectory /mnt" >> /etc/ssh/sshd_config kill -HUP $(cat /run/sshd.pid) +mkdir -p /mnt/var/log/confluent +cp /tmp/confluent*log /mnt/var/log/confluent