Skip to content

Commit

Permalink
dowgrade_kernel: Group all ssh commands in a single one
Browse files Browse the repository at this point in the history
  • Loading branch information
cfergeau authored and praveenkumar committed Apr 28, 2023
1 parent 4f38ccc commit 9b90c53
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions createdisk-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,18 @@ function downgrade_kernel() {
;;
esac

${SSH} core@${vm_ip} -- 'sudo sed -i -z s/enabled=0/enabled=1/ /etc/yum.repos.d/fedora.repo'
${SSH} core@${vm_ip} -- 'sudo sed -i -z s/enabled=0/enabled=1/ /etc/yum.repos.d/fedora-updates.repo'
${SSH} core@${vm_ip} -- "sudo rpm-ostree override replace ${bodhi_url}"
# kernel-modules-core is new in kernel 6.x packages and does not exist in 5.x kernel packages
# it will stay around if we don't explicitly remove it
${SSH} core@${vm_ip} -- 'sudo rpm-ostree override remove kernel-modules-core'
${SSH} core@${vm_ip} -- 'sudo sed -i -z s/enabled=1/enabled=0/ /etc/yum.repos.d/fedora.repo'
${SSH} core@${vm_ip} -- 'sudo sed -i -z s/enabled=1/enabled=0/ /etc/yum.repos.d/fedora-updates.repo'

${SSH} core@${vm_ip} 'sudo bash -x -s' <<EOF
sed -i -z s/enabled=0/enabled=1/ /etc/yum.repos.d/fedora.repo
sed -i -z s/enabled=0/enabled=1/ /etc/yum.repos.d/fedora-updates.repo
rpm-ostree override replace "${bodhi_url}"
# kernel-modules-core is new in kernel 6.x packages and does not exist
# in 5.x kernel packages. It will stay around if we don't explicitly
# remove it
rpm-ostree override remove kernel-modules-core
sed -i -z s/enabled=1/enabled=0/ /etc/yum.repos.d/fedora.repo
sed -i -z s/enabled=1/enabled=0/ /etc/yum.repos.d/fedora-updates.repo
EOF
}

function prepare_cockpit() {
Expand Down

0 comments on commit 9b90c53

Please sign in to comment.