On Fri, Sep 06, 2013 at 04:50:49PM +0200, Zbigniew Jędrzejewski-Szmek wrote: > On Fri, Sep 06, 2013 at 03:19:47PM +0100, Ross Burton wrote: > > If the administrator disables systemd-binfmt it can't be re-enabled > > correctly > > because there is no [Install] block, the symlinks to sysinit being created > > at > > install time manually. Add an Install block so that the those symlinks can > > be > > re-created using systemctl, and a dependency on the automounter in > > systemd-binfmt. > Idea sounds good. >
But doing this means removing the static enabling symlink in sysvinit.target.wants/ to make the [Install] section meaningful, no? Doing so would make this *disabled* by default, breaking existing setups. > > Signed-off-by: Ross Burton <[email protected]> > We don't use that. > > > --- > > units/proc-sys-fs-binfmt_misc.automount | 3 +++ > > units/systemd-binfmt.service.in | 4 ++++ > > 2 files changed, 7 insertions(+) > > > > diff --git a/units/proc-sys-fs-binfmt_misc.automount > > b/units/proc-sys-fs-binfmt_misc.automount > > index 6be3893..709adef 100644 > > --- a/units/proc-sys-fs-binfmt_misc.automount > > +++ b/units/proc-sys-fs-binfmt_misc.automount > > @@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/ > > > > [Automount] > > Where=/proc/sys/fs/binfmt_misc > > + > > +[Install] > > +WantedBy=sysinit.target > > diff --git a/units/systemd-binfmt.service.in > > b/units/systemd-binfmt.service.in > > index 02dfe77..86d3481 100644 > > --- a/units/systemd-binfmt.service.in > > +++ b/units/systemd-binfmt.service.in > > @@ -11,6 +11,7 @@ Documentation=man:systemd-binfmt.service(8) > > man:binfmt.d(5) > > Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt > > DefaultDependencies=no > > Conflicts=shutdown.target > > +Wants=proc-sys-fs-binfmt_misc.automount > Can you replace this by RequiresMountsFor=/proc/sys/fs/binfmt_misc ? > That seems cleaner, and also generates better dependencies: Requires and > After. It won't work at all without the mount, so Requires is better, > and without After there's a race condtion. > > I'd commit it with this change myself, but I don't currently have the means > to test if everything still works. > > Zbyszek > _______________________________________________ > systemd-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/systemd-devel _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
