* being used, but it measured things into a different PCR than we are configured for in
* userspace. (i.e. we expect PCR 11 being used for this by both sd-stub and us) */
- r = secure_getenv_bool("SYSTEMD_FORCE_MEASURE"); /* Give user a chance to override the variable test,
- * for debugging purposes */
- if (r >= 0)
- return (cached = r);
- if (r != -ENXIO)
- log_debug_errno(r, "Failed to parse $SYSTEMD_FORCE_MEASURE, ignoring: %m");
-
if (!efi_has_tpm2())
return (cached = 0);
if (cached >= 0)
return cached;
+ r = secure_getenv_bool("SYSTEMD_FORCE_MEASURE"); /* Give user a chance to override the variable test,
+ * for debugging purposes */
+ if (r >= 0)
+ return (cached = r);
+ if (r != -ENXIO)
+ log_debug_errno(r, "Failed to parse $SYSTEMD_FORCE_MEASURE, ignoring: %m");
+
bool b;
r = proc_cmdline_get_bool("systemd.tpm2_measured_os", /* flags= */ 0, &b);
if (r > 0)