[systemd-devel] [PATCH 0/2] units: add and use ConditionInitrd= instead of checking for /etc/initrd-release.
Lennart Poettering
lennart at poettering.net
Wed Aug 27 11:19:45 PDT 2014
On Wed, 27.08.14 20:26, Ivan Shapovalov (intelfx100 at gmail.com) wrote:
> This is as proposed by Thomas in review of my hibernate-resume patchset.
>
> The objective benefit of this change is that in_initrd() function is used
> for checking, which not only checks for /etc/initrd-release, but also verifies
> that the rootfs is on a virtual device.
If we add a new condition then I want to hear a strong case for it. I
mean, what's wrong with checking for initrd-release? Why would that not
suffice?
We should be really careful when it comes to an inflation of conditions...
>
> Ivan Shapovalov (2):
> units: add ConditionInitrd=
> units: use ConditionInitrd=true instead of ConditionPathExists=/etc/initrd-release
>
> man/systemd.unit.xml | 13 +++++++++++++
> src/core/condition.c | 17 +++++++++++++++++
> src/core/load-fragment-gperf.gperf.m4 | 1 +
> src/shared/condition-util.c | 1 +
> src/shared/condition-util.h | 1 +
> units/initrd-cleanup.service.in | 2 +-
> units/initrd-fs.target | 2 +-
> units/initrd-parse-etc.service.in | 2 +-
> units/initrd-root-fs.target | 2 +-
> units/initrd-switch-root.service.in | 2 +-
> units/initrd-switch-root.target | 2 +-
> units/initrd-udevadm-cleanup-db.service.in | 2 +-
> units/initrd.target | 2 +-
> units/systemd-hibernate-resume at .service.in | 2 +-
> 14 files changed, 42 insertions(+), 9 deletions(-)
>
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list