From 131e5d0c9b426708162953dedf69ab546e0bda40 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Thu, 26 Sep 2024 10:03:41 -0700 Subject: [PATCH] Fix uninstall for amazon linux 2 (#6884) 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