File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
operator/src/main/resources/scripts Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
- # Copyright (c) 2021, 2022 , Oracle and/or its affiliates.
2
+ # Copyright (c) 2021, 2024 , Oracle and/or its affiliates.
3
3
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4
4
5
5
# Init container script for the auxiliary image feature.
@@ -26,6 +26,21 @@ scriptDir="$( cd "$(dirname "$0")" > /dev/null 2>&1 ; pwd -P )"
26
26
27
27
if [ " ${debug} " == " true" ]; then set -x; fi ;
28
28
29
+ # This script runs in the auxiliary image container, which is often using
30
+ # busybox or some other very sparse base image. This script relies on
31
+ # the determining that the shell supports the "starts with" test so
32
+ # make sure that it works and exit if it does not.
33
+
34
+ SHELL_TEST=abcd
35
+ if [[ " ${SHELL_TEST} " == " ab" * ]]; then
36
+ SHELL_IS_GOOD=true
37
+ fi
38
+
39
+ if [ -z " ${SHELL_IS_GOOD} " ]; then
40
+ echo " [SEVERE] The shell in the auxiliary image is missing required functionality. Exiting."
41
+ exit 1
42
+ fi
43
+
29
44
. ${scriptDir} /utils_base.sh
30
45
[ $? -ne 0 ] && echo " [SEVERE] Missing file ${scriptDir} /utils_base.sh" && exit 1
31
46
UNKNOWN_SHELL=true
You can’t perform that action at this time.
0 commit comments