From 77c5e58a538d51f54b0b26b9b40873c81732b294 Mon Sep 17 00:00:00 2001 From: "jin.gjm" Date: Wed, 8 Jun 2022 20:52:55 +0800 Subject: [PATCH] fix2: '/usr/bin/python' is not existed in some OS --- ezctl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ezctl b/ezctl index 9529591..f956695 100755 --- a/ezctl +++ b/ezctl @@ -318,7 +318,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+) - [[ ! -e /usr/bin/python && -e /usr/bin/python3 ]] && ssh "$2" ln -s /usr/bin/python3 /usr/bin/python + ssh "$2" ln -s /usr/bin/python3 /usr/bin/python || echo "" logger info "add $2 into 'kube_node' group" NODE_INFO="${@:2}" @@ -336,7 +336,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+) - [[ ! -e /usr/bin/python && -e /usr/bin/python3 ]] && ssh "$2" ln -s /usr/bin/python3 /usr/bin/python + ssh "$2" ln -s /usr/bin/python3 /usr/bin/python || echo "" logger info "add $2 into 'kube_master' group" MASTER_INFO="${@:2}" @@ -360,7 +360,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+) - [[ ! -e /usr/bin/python && -e /usr/bin/python3 ]] && ssh "$2" ln -s /usr/bin/python3 /usr/bin/python + ssh "$2" ln -s /usr/bin/python3 /usr/bin/python || echo "" logger info "add $2 into 'etcd' group" ETCD_INFO="${@:2}"