soft-reboot allows switching into a different root/installation,
i.e. potentially invalidate settings from kernel cmdline and such.
Let's hence inform generators about soft-reboots.
<xi:include href="version-info.xml" xpointer="v251"/></listitem>
</varlistentry>
+ <varlistentry>
+ <term><varname>$SYSTEMD_SOFT_REBOOTS_COUNT</varname></term>
+
+ <listitem><para>If the system has soft-rebooted, this variable is set to the count of soft-reboots.
+ This environment variable is only set for system generators.</para>
+
+ <xi:include href="version-info.xml" xpointer="v257"/></listitem>
+ </varlistentry>
+
<varlistentry>
<term><varname>$SYSTEMD_FIRST_BOOT</varname></term>
if (r < 0)
return r;
+ if (m->soft_reboots_count > 0) {
+ r = strv_env_assignf(&nl, "SYSTEMD_SOFT_REBOOTS_COUNT", "%u", m->soft_reboots_count);
+ if (r < 0)
+ return r;
+ }
+
if (m->first_boot >= 0) {
r = strv_env_assign(&nl, "SYSTEMD_FIRST_BOOT", one_zero(m->first_boot));
if (r < 0)