Skip to content

Commit

Permalink
supply 'yes' flag to remote node commands (#4844)
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya authored Sep 25, 2023
1 parent dfaf6ae commit c21ae87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/common/addon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ function addon_outro() {
if [ "$AIRGAP" = "1" ]; then
local command=
command=$(printf "cat ./upgrade.sh | sudo bash -s airgap${common_flags}")
echo "$command" > "$DIR/remotes/allnodes"
echo "$command yes" > "$DIR/remotes/allnodes"

printf "\n\t${GREEN}%s${NC}\n\n" "$command"
else
Expand All @@ -318,7 +318,7 @@ function addon_outro() {

local command=
command=$(printf "${prefix}upgrade.sh | sudo bash -s${common_flags}")
echo "$command" > "$DIR/remotes/allnodes"
echo "$command yes" > "$DIR/remotes/allnodes"

printf "\n\t${GREEN}%s${NC}\n\n" "$command"
fi
Expand Down
4 changes: 2 additions & 2 deletions scripts/common/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -522,15 +522,15 @@ function upgrade_kubernetes_remote_node() {
if [ "$AIRGAP" = "1" ]; then
local command=
command=$(printf "cat ./upgrade.sh | sudo bash -s airgap kubernetes-version=%s%s" "$targetK8sVersion" "$common_flags")
echo "$command" > "$DIR/remotes/$nodeName"
echo "$command yes" > "$DIR/remotes/$nodeName"
printf "\t%b%s%b\n\n" "$GREEN" "$command" "$NC"
else
local prefix=
prefix="$(build_installer_prefix "${INSTALLER_ID}" "${KURL_VERSION}" "${KURL_URL}" "${PROXY_ADDRESS}" "${PROXY_HTTPS_ADDRESS}")"

local command=
command=$(printf "%supgrade.sh | sudo bash -s kubernetes-version=%s%s" "$prefix" "$targetK8sVersion" "$common_flags")
echo "$command" > "$DIR/remotes/$nodeName"
echo "$command yes" > "$DIR/remotes/$nodeName"

printf "\t%b %s%b\n\n" "$GREEN" "$command" "$NC"
fi
Expand Down

0 comments on commit c21ae87

Please sign in to comment.