From d4d54a1ff58426bfbe658ddc02bc0901bfa67a79 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Fri, 4 Nov 2016 14:41:34 +0000 Subject: [PATCH] Clean up CNI symlinks from weave-kube --- weave | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weave b/weave index 6a081dd9..8e9247d3 100755 --- a/weave +++ b/weave @@ -1028,6 +1028,11 @@ peer_args() { ###################################################################### create_cni_script() { + # If target file is a symlink, it's probably a remnant of a weave-kube + # installation - if the user has now switched back to `weave launch`, + # we need to remove the link before rewriting the contents: + [ -L "$1" ] && rm "$1" # fail if we can't remove the link + cat >"$1" <