1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 15:47:14 +01:00

OCPBUGS-61373: Fix agent shellcheck issues

Disable shellcheck on agent-image.env The file is generated at
runtime after get-container-images.sh is executed.

Added missing double quotes and switch echo to printf in
install-status.sh
This commit is contained in:
Richard Su
2025-09-08 16:58:49 -04:00
parent c805b240dc
commit 357c01c3f9
2 changed files with 8 additions and 7 deletions

View File

@@ -3,17 +3,18 @@
set -xeuo pipefail
/usr/local/bin/get-container-images.sh
# shellcheck disable=SC1091
source /usr/local/share/assisted-service/agent-images.env
echo "Extracting agent-tui and libnmstate from agent-installer-utils image $AGENT_INSTALLER_UTILS_IMAGE"
container_id=$(podman create $AGENT_INSTALLER_UTILS_IMAGE)
mnt=$(podman mount $container_id)
container_id=$(podman create "$AGENT_INSTALLER_UTILS_IMAGE")
mnt=$(podman mount "$container_id")
cp ${mnt}/usr/bin/agent-tui /usr/local/bin
cp ${mnt}/usr/lib64/libnmstate.so.* /usr/local/lib
cp "${mnt}/usr/bin/agent-tui" /usr/local/bin
cp "${mnt}/usr/lib64/libnmstate.so.*" /usr/local/lib
podman unmount $container_id
podman rm $container_id
podman unmount "$container_id"
podman rm "$container_id"
restorecon -FRv /usr/local/bin

View File

@@ -54,7 +54,7 @@ check_host_config() {
check_ui() {
local ui_issue="90_ui-availability"
if systemctl is-active --quiet "agent-start-ui"; then
echo "\\e{green}Please go to \\e{lightgreen}$AIUI_URL\\e{reset}\\e{green} in your browser to continue the installation\\e{reset}" | set_issue "${ui_issue}"
printf "\\e{green}Please go to \\e{lightgreen}%s\\e{reset}\\e{green} in your browser to continue the installation\\e{reset}" "${AIUI_URL}" | set_issue "${ui_issue}"
else
clear_issue "${ui_issue}"
fi