aboutsummaryrefslogtreecommitdiffstats
path: root/community/k3s/k3s.pre-deinstall
diff options
context:
space:
mode:
Diffstat (limited to 'community/k3s/k3s.pre-deinstall')
-rwxr-xr-xcommunity/k3s/k3s.pre-deinstall9
1 files changed, 9 insertions, 0 deletions
diff --git a/community/k3s/k3s.pre-deinstall b/community/k3s/k3s.pre-deinstall
new file mode 100755
index 00000000000..9c31e8aee4a
--- /dev/null
+++ b/community/k3s/k3s.pre-deinstall
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+cd /
+for link in kubectl crictl ctr; do
+ target=/usr/bin/$link
+ if [ -L $target ] && [ "$(readlink $target)" = "/usr/bin/k3s" ]; then
+ rm $target
+ fi
+done