diff --git a/ga/latest/kernel/helpers/build/configure.sh b/ga/latest/kernel/helpers/build/configure.sh index da873b2b2..77f0c7698 100755 --- a/ga/latest/kernel/helpers/build/configure.sh +++ b/ga/latest/kernel/helpers/build/configure.sh @@ -1,5 +1,5 @@ #!/bin/bash -# (C) Copyright IBM Corporation 2020, 2023. +# (C) Copyright IBM Corporation 2020, 2025. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,9 +20,7 @@ else FEATURES_INSTALLED=false fi -if [ "$VERBOSE" != "true" ]; then - exec >/dev/null -fi +. /opt/ibm/helpers/build/internal/logger.sh set -Eeox pipefail @@ -128,8 +126,10 @@ function main() { if [ "$SSL" != "false" ] && [ "$TLS" != "false" ]; then if [ ! -e $keystorePath ]; then # Generate the keystore.xml - export KEYSTOREPWD=$(openssl rand -base64 32) + hideLogs + KEYSTOREPWD=$(openssl rand -base64 32) sed "s|REPLACE|$KEYSTOREPWD|g" $SNIPPETS_SOURCE/keystore.xml > $SNIPPETS_TARGET_DEFAULTS/keystore.xml + showLogs chmod g+w $SNIPPETS_TARGET_DEFAULTS/keystore.xml fi fi @@ -231,4 +231,4 @@ function parseCommaList() { done } -main "$@" +main "$@" \ No newline at end of file diff --git a/ga/latest/kernel/helpers/build/features.sh b/ga/latest/kernel/helpers/build/features.sh index f6ac61528..a9469b85c 100755 --- a/ga/latest/kernel/helpers/build/features.sh +++ b/ga/latest/kernel/helpers/build/features.sh @@ -1,5 +1,5 @@ #!/bin/bash -# (C) Copyright IBM Corporation 2023. +# (C) Copyright IBM Corporation 2023, 2025. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,9 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -if [ "$VERBOSE" != "true" ]; then - exec >/dev/null -fi +. /opt/ibm/helpers/build/internal/logger.sh set -Eeox pipefail diff --git a/ga/latest/kernel/helpers/build/infinispan-client-setup.sh b/ga/latest/kernel/helpers/build/infinispan-client-setup.sh index 37dcda2b5..7530d1f96 100755 --- a/ga/latest/kernel/helpers/build/infinispan-client-setup.sh +++ b/ga/latest/kernel/helpers/build/infinispan-client-setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# (C) Copyright IBM Corporation 2020. +# (C) Copyright IBM Corporation 2020, 2025. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,9 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -if [ "$VERBOSE" != "true" ]; then - exec >/dev/null -fi +. /opt/ibm/helpers/build/internal/logger.sh set -Eeox pipefail diff --git a/ga/latest/kernel/helpers/build/internal/logger.sh b/ga/latest/kernel/helpers/build/internal/logger.sh new file mode 100755 index 000000000..a4fd59ca3 --- /dev/null +++ b/ga/latest/kernel/helpers/build/internal/logger.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# (C) Copyright IBM Corporation 2025. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +function main() { + if [ "$VERBOSE" != "true" ]; then + exec >/dev/null + fi +} + +function hideLogs() { + exec 3>&1 >/dev/null 4>&2 2>/dev/null +} + +function showLogs() { + exec 1>&3 3>&- 2>&4 4>&- +} + +main \ No newline at end of file diff --git a/ga/latest/kernel/helpers/build/populate_scc.sh b/ga/latest/kernel/helpers/build/populate_scc.sh index c794e5a21..ac2b762e8 100755 --- a/ga/latest/kernel/helpers/build/populate_scc.sh +++ b/ga/latest/kernel/helpers/build/populate_scc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# (C) Copyright IBM Corporation 2020, 2024 +# (C) Copyright IBM Corporation 2020, 2025. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,9 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -if [ "$VERBOSE" != "true" ]; then - exec >/dev/null -fi +. /opt/ibm/helpers/build/internal/logger.sh set -Eeox pipefail