Skip to content

Commit ee3258d

Browse files
committed
node-builder: Fix SHIM_USE_DEBUG_CONFIG behavior
Using a symlink would create a cycle after calling this script again when copying the final configuration at line 74 so we just use cp instead. Signed-off-by: Aurélien Bombo <[email protected]>
1 parent 9d7074b commit ee3258d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/osbuilder/node-builder/azure-linux/package_install.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ if [ "${CONF_PODS}" == "yes" ]; then
4848

4949
if [ "${SHIM_USE_DEBUG_CONFIG}" == "yes" ]; then
5050
# We simply override the release config with the debug config,
51-
# which is probably fine when debugging.
52-
ln -sf src/runtime/config/"${SHIM_DBG_CONFIG_FILE_NAME}" src/runtime/config/"${SHIM_CONFIG_FILE_NAME}"
51+
# which is probably fine when debugging. Not symlinking as that
52+
# would create cycles the next time this script is called.
53+
echo "Overriding shim configuration with debug shim configuration"
54+
cp -a --backup=numbered src/runtime/config/"${SHIM_DBG_CONFIG_FILE_NAME}" src/runtime/config/"${SHIM_CONFIG_FILE_NAME}"
5355
fi
5456

5557
echo "Enabling and starting snapshotter service"

0 commit comments

Comments
 (0)