Skip to content

Commit 38d9c2d

Browse files
committed
Fix restore logic for domainBin and domainLib when preparing mii server.
1 parent b038e60 commit 38d9c2d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

operator/src/main/resources/scripts/modelInImage.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,14 +1329,17 @@ restoreAppAndLibs() {
13291329

13301330
createFolder "${DOMAIN_HOME}/lib" "This is the './lib' directory within DOMAIN_HOME directory 'domain.spec.domainHome'." || return 1
13311331
local WLSDEPLOY_DOMAINLIB="wlsdeploy/domainLibraries"
1332-
1332+
local TMP_EXTRACT_LIST=""
13331333
for file in $(sort_files ${IMG_ARCHIVES_ROOTDIR} "*.zip")
13341334
do
13351335

13361336
# expand the archive domain libraries to the domain lib, 11 is caution when zip entry doesn't exists
13371337
cd ${DOMAIN_HOME}/lib || exitOrLoop
13381338
if [ -f $DOMAIN_BIN_LIB_LIST ] ; then
1339-
unzip -jo ${IMG_ARCHIVES_ROOTDIR}/${file} $(awk '{print $0}' <<< $(grep "wlsdeploy/domainLibraries" $DOMAIN_BIN_LIB_LIST))
1339+
TMP_EXTRACT_LIST=$(awk '{print $0}' <<< $(grep "wlsdeploy/domainLibraries" $DOMAIN_BIN_LIB_LIST))
1340+
if [ -n "$TMP_EXTRACT_LIST" ] ; then
1341+
unzip -jo ${IMG_ARCHIVES_ROOTDIR}/${file} $TMP_EXTRACT_LIST
1342+
fi
13401343
else
13411344
unzip -jo ${IMG_ARCHIVES_ROOTDIR}/${file} wlsdeploy/domainLibraries/*
13421345
fi
@@ -1351,7 +1354,10 @@ restoreAppAndLibs() {
13511354
# zip entry doesn't exists
13521355
cd ${DOMAIN_HOME}/bin || exitOrLoop
13531356
if [ -f $DOMAIN_BIN_LIB_LIST ] ; then
1354-
unzip -jo ${IMG_ARCHIVES_ROOTDIR}/${file} $(awk '{print $0}' <<< $(grep "wlsdeploy/domainBin" $DOMAIN_BIN_LIB_LIST))
1357+
TMP_EXTRACT_LIST=$(awk '{print $0}' <<< $(grep "wlsdeploy/domainBin" $DOMAIN_BIN_LIB_LIST))
1358+
if [ -n "$TMP_EXTRACT_LIST" ] ; then
1359+
unzip -jo ${IMG_ARCHIVES_ROOTDIR}/${file} $TMP_EXTRACT_LIST
1360+
fi
13551361
else
13561362
unzip -jo ${IMG_ARCHIVES_ROOTDIR}/${file} wlsdeploy/domainBin/*
13571363
fi

0 commit comments

Comments
 (0)