On Mon, Sep 26, 2016 at 4:00 AM, Sergei Franco <sergei.fra...@gmail.com>
wrote:

> From further reading of documentation, please correct me if I am wrong,
> one way (not sure if correct) to start SSH during emergency mode is to edit
> /etc/systemd/system/sshd.service and modify:
>
> WantedBy=multi-user.target
>
> to
>
> WantedBy=multi-user.target emergency.target
>
> Do I need to do anything with networking service or systemd will figure
> dependency of SSH service automatically? Any reason why emergency mode is
> not running SSH by default?
>

Just WantedBy= is not enough; you need the actual symlink to happen, and
`systemctl add-wants emergency.target sshd.service` is probably quicker
than WantedBy+enable.

That said, I suspect the reason it's not done by default is that it also
needs *networking*, and every distro has its own network setup services,
some of them dragging in *other* services like udev or dbus, which is
somewhat contrary to emergency.target being completely minimal... (Maybe
there should be system-failure.target for this?)

-- 
Mantas Mikulėnas <graw...@gmail.com>
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to