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

Andrei Borzenkov arvidjaar at gmail.com
Tue Aug 26 23:59:15 PDT 2014


On Wed, Aug 27, 2014 at 10:18 AM, 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.
>

Semantic of Requires is simply wrong for device - you cannot "start"
device, you can only passively wait for it. Requisite is more
appropriate to express "cannot start until device is available". But I
think, BindsTo is established usage for devices and is quite clear
here.

>> +Wants=local-fs-pre.target
>> +After=%i.device
>> +Before=local-fs-pre.target systemd-remount-fs.service systemd-fsck-root.service
>
> 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?
>
> What's the purpose of ordering this against systemd-fsck-root.service?

I suppose it is leftover from the first version which was intended to
support non-initrd case as well.


More information about the systemd-devel mailing list