Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a086738

Browse files
committed
change sha check to warning if custom build used (because hardcoded sha wont match)
1 parent 44bbda1 commit a086738

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/installes.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@
5959
# 20241020 more bracketed paste mode disabling
6060
# 20241203 rework test logic at end of setup to improve messages and add crash.log detection and print log if detected
6161
# 20241203 add info on splunk version in output
62+
# 20250115 change sha check to warning if custom build used (because hardcoded sha wont match)
6263

63-
VERSION="20241203c"
64+
VERSION="20250115"
6465

6566
SCRIPTNAME="installes"
6667

@@ -194,19 +195,23 @@ CONTENTUPDATE=`LANG=C;find ${INSTALLAPPDIR} -name "splunk-es-content-update_*.
194195
NBARG=$#
195196
ARG1=$1
196197
ARG2=$2
198+
USEESAPPBYARG=0
197199

198200
if [ $NBARG -eq 0 ]; then
199201
echo "no arg, using default"
200202
elif [ $NBARG -eq 1 ]; then
201203
ESAPP=$ARG1
204+
USEESAPPBYARG=1
202205
elif [ $NBARG -eq 2 ]; then
203206
ESAPP=$ARG1
207+
USEESAPPBYARG=1
204208
ESCU=$ARG2
205209
CONTENTUPDATE=$ESCU
206210
else
207211
#elif [ $NBARG -gt 1 ]; then
208212
echo "ERROR: Your command line contains too many ($#) arguments. Ignoring the extra data"
209213
ESAPP=$ARG1
214+
USEESAPPBYARG=1
210215
ESCU=$ARG2
211216
CONTENTUPDATE=$ESCU
212217
fi
@@ -356,6 +361,8 @@ else
356361
debug_log "GOT=${SHAb}"
357362
if [ "${EXPECTEDSHA}" = "${SHAb}" ]; then
358363
echo_log "OK: SHA256 verified successfully for Splunk ES installation files ${ESAPPFULL} ${SHAb}"
364+
elif [ ${USEESAPPBYARG} -eq 1 ]; then
365+
echo_log "OK: file ${ESAPPFULL} SHA256=${SHAb} custom app provided cant check"
359366
else
360367
fail_log "ERROR: SHA256 doesnt match for ${ESAPPFULL}. possible binary corruption (or you changed binary and it doesn't match expected hash), please investigate why the check failed. EXP=${EXPECTEDSHA},GOT=${SHAb} "
361368
((FAIL++))

0 commit comments

Comments
 (0)