From 4c96735b6deedd093165e7e8c72a92fe549ad0c2 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 26 Jul 2021 13:51:36 -0400 Subject: [PATCH] Add ssh to post phase of cloning --- .../el8-diskless/profiles/default/scripts/installimage | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/confluent_osdeploy/el8-diskless/profiles/default/scripts/installimage b/confluent_osdeploy/el8-diskless/profiles/default/scripts/installimage index 234f29ee..5a462445 100644 --- a/confluent_osdeploy/el8-diskless/profiles/default/scripts/installimage +++ b/confluent_osdeploy/el8-diskless/profiles/default/scripts/installimage @@ -33,6 +33,11 @@ lvm vgchange -a n udevadm control -e chroot /sysroot /usr/lib/systemd/systemd-udevd --daemon chroot /sysroot bash -c "source /etc/confluent/functions; run_remote_python image2disk.py" +echo "Port 22" >> /etc/ssh/sshd_config +echo 'Match LocalPort 22' >> /etc/ssh/sshd_config +echo ' ChrootDirectory /sysroot/run/imginst/targ' >> /etc/ssh/sshd_config +kill -HUP $(cat /run/sshd.pid) + chroot /sysroot/run/imginst/targ bash -c "source /etc/confluent/functions; run_remote post.sh" chroot /sysroot bash -c "umount \$(tac /proc/mounts|awk '{print \$2}'|grep ^/run/imginst/targ)"