From c3ddb38eba1b3633b8b039590545df34086495b5 Mon Sep 17 00:00:00 2001 From: gjmzj Date: Tue, 17 Jan 2023 17:23:59 +0800 Subject: [PATCH] fix: ignore /usr/bin/python link existed warning --- ezctl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ezctl b/ezctl index 204b8a8..cd51445 100755 --- a/ezctl +++ b/ezctl @@ -324,7 +324,7 @@ function add-node() { sed -n '/^\[kube_master/,/^\[harbor/p' "$BASE/clusters/$1/hosts"|grep -E "^$2$|^$2 " && { logger error "node $2 already existed in $BASE/clusters/$1/hosts"; return 2; } # add '/usr/bin/python' soft link, needed in some OS (ubuntu 16.04+) - ssh "$2" ln -s /usr/bin/python3 /usr/bin/python || echo "" + ssh "$2" ln -s /usr/bin/python3 /usr/bin/python > /dev/null 2>&1 || echo "" logger info "add $2 into 'kube_node' group" NODE_INFO="${@:2}" @@ -342,7 +342,7 @@ function add-master() { sed -n '/^\[kube_master/,/^\[kube_node/p' "$BASE/clusters/$1/hosts"|grep -E "^$2$|^$2 " && { logger error "master $2 already existed!"; return 2; } # add '/usr/bin/python' soft link, needed in some OS (ubuntu 16.04+) - ssh "$2" ln -s /usr/bin/python3 /usr/bin/python || echo "" + ssh "$2" ln -s /usr/bin/python3 /usr/bin/python > /dev/null 2>&1 || echo "" logger info "add $2 into 'kube_master' group" MASTER_INFO="${@:2}" @@ -366,7 +366,7 @@ function add-etcd() { sed -n '/^\[etcd/,/^\[kube_master/p' "$BASE/clusters/$1/hosts"|grep -E "^$2$|^$2 " && { logger error "etcd $2 already existed!"; return 2; } # add '/usr/bin/python' soft link, needed in some OS (ubuntu 16.04+) - ssh "$2" ln -s /usr/bin/python3 /usr/bin/python || echo "" + ssh "$2" ln -s /usr/bin/python3 /usr/bin/python > /dev/null 2>&1 || echo "" logger info "add $2 into 'etcd' group" ETCD_INFO="${@:2}"