I know everyone here is super busy, but I just wanted to bump this a sec before letting it die to make sure it didn't just get lost or something. (If someone agrees that it should be a feature, I'd happily try to work on it.) On Tue, Mar 20, 2018 at 4:08 PM, Ryan Gonzalez <rymg19 at gmail.com> wrote: > Hello!! > > Recently, I was trying to help out someone on IRC move some sysvinit > scripts over to systemd units, and there was one interesting issue > that came up. Many older daemons will create sockets at some > unspecified point in their startup sequence, with no indication of > when this occurs. In this case, it was a bit after the pid file, so > systemd started running units that required this socket ready before > it was actually ready. > > Using socket activation here would be great, but again, this is an > older daemon, and AFAIK socket activation *always* requires a deamon > to read the socket path over stdin. > > Here's my idea: what if there were WantsFileBefore= and > WantsFileAfter= options, that could be used like this: > > [Service] > Type=oneshot > ExecStart=/usr/bin/my-service > WantsFileBefore=this-file-should-be-existant-before-running-service > WantsFileAfter=systemd-should-wait-until-this-file-exists-before-continuing > > In short, WantsFileBefore=file would be roughly equivalent to > ExecPreStart=wait-for-file file, and WantsFileAfter=file would be > roughly equivalent to ExecPostStart=wait-for-file file. Of course, > now there would be no need to useless shell commands. > > Thoughts? > > -- > Ryan (����) > Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone > else > https://refi64.com/ -- Ryan (����) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else https://refi64.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180323/c6165688/attachment.html>