[systemd-devel] [PATCHv6 2/3] hibernate-resume: add a tool to write a device node's major:minor to /sys/power/resume.
thomas at archlinux.org
Wed Aug 27 00:35:45 PDT 2014
Am 27.08.2014 um 09:22 schrieb Ivan Shapovalov:
>>> +Description=Resume from hibernation using device %f
>>> +Documentation=man:systemd-hibernate-resume at .service(8)
>> 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.
> This is just because systemd-fsck at .service does the same. Seems like it's
> the "established usage", as Andrei says.
Configures requirement dependencies, very similar in style to
Requires=, however in addition to this behavior, it also declares that
this unit is stopped when any of the units listed suddenly disappears.
"Stopping" a oneshot unit makes no sense, that's why I find BindsTo
confusing. If systemd-fsck at .service does the same, then we should do the
same thing here.
>> The part of ordering this Before=local-fs-pre.target is so crucial, it
>> can't be stressed enough. If _anything_ writes to _any_ file system
>> before this service runs, your system is broken and your data is lost.
>> That said, are you sure that all services are properly ordered against
>> the target?
> I've spent quite some time verifying this. The only thing not covered
> is usr.mount (not sysroot-usr.mount), but Lennart says any configuration
> with initramfs's /usr split off is broken.
I've never heard of such a configuration.
> (Yes, I assume that lvm2, mdadm/mdmon, dm-event and so on don't write
> to filesystems. If I'm wrong -- this needs to be fixed...)
They really shouldn't. And they may be required for resuming (you can
resume from swap on lvm on an encrypted container, which is a rather
>> We should have and use ConditionInitrd=. I am surprised that this
>> doesn't exist, but it really should.
> Would you accept a patch adding that (using in_initrd()) and converting
> all uses of ConditionPathExists=/etc/initrd-release to this new
> condition statement?
I am not the one to accept patches here, but I'd love to see this
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the systemd-devel