Skip to content

Commit b802d38

Browse files
committed
build_sysext: Only reload systemd when actually necessary
No need to prod it if the sysext doesn't include any systemd units. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
1 parent 6b69361 commit b802d38

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎build_sysext‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,14 @@ for entry in "${BUILD_DIR}/${FLAGS_install_root_basename}"/*; do
289289
rm -rf "${entry}"
290290
done
291291

292+
EXTENSION_RELOAD_MANAGER=0
293+
[[ -d ${BUILD_DIR}/${FLAGS_install_root_basename}/usr/lib/systemd ]] && EXTENSION_RELOAD_MANAGER=1
294+
292295
grep . <<EOF | install -m0644 -D /dev/stdin "${BUILD_DIR}/${FLAGS_install_root_basename}/usr/lib/extension-release.d/extension-release.${SYSEXT_ID}"
293296
ID='flatcar'
294297
${VERSION_FIELD_OVERRIDE:-VERSION_ID}=${FLATCAR_VERSION_ID@Q}
295298
ARCHITECTURE=${ARCH@Q}
296-
EXTENSION_RELOAD_MANAGER=1
299+
EXTENSION_RELOAD_MANAGER=${EXTENSION_RELOAD_MANAGER}
297300
SYSEXT_ID=${SYSEXT_ID@Q}
298301
${SYSEXT_NAME:+SYSEXT_NAME=${SYSEXT_NAME@Q}}
299302
${PVR:+SYSEXT_VERSION_ID=${PVR@Q}}

0 commit comments

Comments
 (0)