From abf921ceb18a3854321df15fed8f591ee1057f42 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Wed, 2 Oct 2024 11:24:52 -0700 Subject: [PATCH] Fix uninstall for amazon linux 2 (#6920) Signed-off-by: Derek Nola --- bundle/bin/rke2-uninstall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundle/bin/rke2-uninstall.sh b/bundle/bin/rke2-uninstall.sh index b8cb05d788..85fb5eb582 100755 --- a/bundle/bin/rke2-uninstall.sh +++ b/bundle/bin/rke2-uninstall.sh @@ -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 @@ -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