On Wed, 27.08.14 20:26, Ivan Shapovalov (intelfx...@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-res...@.service.in | 2 +- > 14 files changed, 42 insertions(+), 9 deletions(-) > Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel