2020-07-23 16:29:43 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# This script runs after install is complete, but inside the installer
|
|
|
|
# environment. This is useful for carrying work done in pre/during the
|
|
|
|
# installer into the installed environment.
|
|
|
|
|
|
|
|
# It is almost certainly more useful to use post.sh or firstboot.sh
|
|
|
|
# for customization, which will run in a more normal mechanism
|
|
|
|
|
|
|
|
nodename=$(grep ^NODENAME /etc/confluent/confluent.info|awk '{print $2}')
|
2021-05-03 19:54:39 +00:00
|
|
|
export confluent_mgr confluent_profile nodename
|
2020-07-23 16:29:43 +00:00
|
|
|
cp -a /etc/confluent /mnt/sysimage/etc
|
2021-04-23 13:08:50 +00:00
|
|
|
chmod -R og-rwx /mnt/sysimage/etc/confluent
|
2020-07-23 16:29:43 +00:00
|
|
|
cp /tmp/functions /mnt/sysimage/etc/confluent/
|
2021-08-26 13:33:16 +00:00
|
|
|
hostnamectl set-hostname $nodename
|
|
|
|
cp /etc/hostname /mnt/sysimage/etc/hostname
|
2020-07-23 16:29:43 +00:00
|
|
|
. /tmp/functions
|
2021-04-28 17:46:26 +00:00
|
|
|
if [ -f /tmp/cryptboot ]; then
|
|
|
|
cp /tmp/cryptboot /mnt/sysimage/tmp/
|
|
|
|
fi
|
2021-04-30 13:39:00 +00:00
|
|
|
mkdir -p /mnt/sysimage/var/log/confluent
|
|
|
|
mv /tmp/confluent-pre.log /mnt/sysimage/var/log/confluent
|
2021-04-23 13:08:50 +00:00
|
|
|
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
|
|
|
|
kill -HUP $(cat /run/sshd.pid)
|
2020-07-23 16:29:43 +00:00
|
|
|
|
|
|
|
# Preserve the ssh setup work done for the installer
|
|
|
|
# by copying into the target system and setting up
|
|
|
|
# host based authentication
|
|
|
|
run_remote setupssh.sh
|