[systemd-devel] Emergency mode if non-critical /etc/fstab entries are missing

Mantas Mikulėnas grawity at gmail.com
Mon Sep 26 05:11:32 UTC 2016


On Mon, Sep 26, 2016 at 4:00 AM, Sergei Franco <sergei.franco at 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 <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160926/645a0ba7/attachment.html>


More information about the systemd-devel mailing list