Skip to content

Commit

Permalink
Fix uninstall for amazon linux 2 (#6920)
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Nola <[email protected]>
  • Loading branch information
dereknola authored Oct 2, 2024
1 parent 78e173a commit abf921c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bundle/bin/rke2-uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ check_target_ro() {
RKE2_DATA_DIR=${RKE2_DATA_DIR:-/var/lib/rancher/rke2}

. /etc/os-release
if [ -r /etc/redhat-release ] || [ -r /etc/centos-release ] || [ -r /etc/oracle-release ] || [ -r /etc/amazon-linux-release ]; then
if [ -r /etc/redhat-release ] || [ -r /etc/centos-release ] || [ -r /etc/oracle-release ] || [ -r /etc/system-release ]; then
# If redhat/oracle family os is detected, double check whether installation mode is yum or tar.
# yum method assumes installation root under /usr
# tar method assumes installation root under /usr/local
Expand Down Expand Up @@ -69,7 +69,7 @@ uninstall_disable_services()
uninstall_remove_files()
{

if [ -r /etc/redhat-release ] || [ -r /etc/centos-release ] || [ -r /etc/oracle-release ] || [ -r /etc/amazon-linux-release ]; then
if [ -r /etc/redhat-release ] || [ -r /etc/centos-release ] || [ -r /etc/oracle-release ] || [ -r /etc/system-release ]; then
yum remove -y "rke2-*"

rm -f /etc/yum.repos.d/rancher-rke2*.repo
Expand Down

0 comments on commit abf921c

Please sign in to comment.