Skip to content

Commit

Permalink
Fix badly formatted post install script for CentOS
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Diblik <[email protected]>
  • Loading branch information
danmyway committed Jul 30, 2024
1 parent f8e76f8 commit 50b9cfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tesar/dispatch/tf_send_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def submit_test(
post_install_script = "#!/bin/bash\nsudo sed -i 's/^.*ssh-rsa/ssh-rsa/' /root/.ssh/authorized_keys; rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux"
elif "centos" in tmt_distro:
# After the CentOS EOL the repositories were moved to the vault, modify the repofile to address the changes
post_install_script = "#!/bin/bash\nsudo sed -i 's/^.*ssh-rsa/ssh-rsa/' /root/.ssh/authorized_keys; sed -i -e 's|^\(mirrorlist=.*\)|#\1|' -e 's|^baseurl=\(.*\)|#baseurl=\1|' -e 's|^#baseurl=http://mirror\(.*\)|baseurl=http://vault\1|' /etc/yum.repos.d/CentOS-*"
post_install_script = "#!/bin/bash\nsudo sed -i 's/^.*ssh-rsa/ssh-rsa/' /root/.ssh/authorized_keys; sed -i -e 's|^\(mirrorlist=.*\)|#\\1|' -e 's|^baseurl=\(.*\)|#baseurl=\\1|' -e 's|^#baseurl=http://mirror\(.*\)|baseurl=http://vault\\1|' /etc/yum.repos.d/CentOS-*"
else:
# For some images (Alma, Rocky) we need to use post-install-script to enable root login.
post_install_script = "#!/bin/bash\nsudo sed -i 's/^.*ssh-rsa/ssh-rsa/' /root/.ssh/authorized_keys"
Expand Down

0 comments on commit 50b9cfc

Please sign in to comment.