[systemd-devel] hanging reboot
Uoti Urpala
uoti.urpala at pp1.inet.fi
Wed Mar 8 04:17:20 UTC 2017
On Wed, 2017-03-08 at 13:05 +1300, Sergei Franco wrote:
>
> The official ubuntu fix does not resolve the hang.
> The problem is that the unattended-upgrades script relies on /var/run
> being mounted, if the /var/ is a separate filesystem it gets
> unmounted and thus hanging the script (where it waits for the lock to
> be available).
>
>
> Here is the official ubuntu unattended-upgrade-shutdown unit:
> How does one would fix this unit so it is ran before the file systems
> get unmounted?
To answer your specific question, you could declare a dependency on
/var being mounted. However, if your above comment about it relying
only on /var/run being mounted is accurate, there is a better solution.
/var/run is just a legacy compatibility symlink to /run. Fix the script
to use the real /run path directly instead of /var/run, and there will
be no dependency on /var.
OTOH if that script actually installs packages then the installation
probably requires /var (and possibly other filesystems?) to be mounted,
and you should add RequiresMountsFor and other possible dependencies
required for package installation to work.
More information about the systemd-devel
mailing list