Am 27.08.2014 um 09:22 schrieb Ivan Shapovalov: >>> +[Unit] >>> +Description=Resume from hibernation using device %f >>> +Documentation=man:systemd-hibernate-resume@.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. > > This is just because systemd-fsck@.service does the same. Seems like it's > the "established usage", as Andrei says.
BindsTo= 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@.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 common setup). >>> +ConditionPathExists=/etc/initrd-release >> >> 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 implemented.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel