[systemd-devel] [PATCHv6 2/3] hibernate-resume: add a tool to write a device node's major:minor to /sys/power/resume.

Lennart Poettering lennart at poettering.net
Wed Aug 27 11:55:48 PDT 2014


On Wed, 27.08.14 08:18, Thomas Bächler (thomas at archlinux.org) wrote:

> > +[Unit]
> > +Description=Resume from hibernation using device %f
> > +Documentation=man:systemd-hibernate-resume at .service(8)
> > +DefaultDependencies=no
> > +BindsTo=%i.device
> 
> What's the purpose of BindsTo= as opposed to Requires= here. They are
> both the same for a oneshot service, but the former is more confusing.

Yeah, I figure Requires= might be slightly more appropriate for this,
given that it fails on its own if the device ends up not being available
anymore...

> What's the purpose of ordering this against systemd-fsck-root.service?
> This service is not run in initrd ever, because it checks
> 'ConditionPathIsReadWrite=!/', which always fails in initrd.

I think for most purposes we should consider the initrd mostly
read-only, hence I wouldn't rely on this check, even though it might
effectively make the dep unnecessary...

> > +ConditionPathExists=/etc/initrd-release
> 
> We should have and use ConditionInitrd=. I am surprised that this
> doesn't exist, but it really should.

Why?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list