During boot, the initial transaction may contain both snapd.socket and
snapd.service at the same time. In such cases, snapd.service should be
started strictly after snapd.socket (After+Requires), instead of just
simultaniously with it (Requires alone).
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Make the recovery chooser trigger service depend on /dev/input being non-empty.
This will make systemd skip the service when there are no input devices.
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
Add RequiresMountsFor= for the two directories snapd.apparmor.service
actually depends on, the location of the profiles and the location of
the cache.
This was always the case, but it slipped below our radar. This is now
relevant due to experimental ZFS support available in Ubuntu 20.04,
which puts /var/lib on a separate mount point that is not available on
early boot.
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
While the code may have references to "snappy" we have long ago
not exposed that name. Fix the service description so that the
"Snappy" reference is not seen on system startup nor shutdown.
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
This specifically will cause snapd.failure to kick in if 2 broken snapd's are
installed without a reboot or explicitly stopping the snapd.failure service so
that on the second time, snapd.failure will actually be started.
Because of this, it's no longer sufficient to check to see if the snapd.failure
service is active after a broken snapd is installed, we have to look at the logs
to see that it was actually activated/started more times after the broken snapd
was installed than before.
Also since it's always basically inactive, remove the restore section since
there's no point to stopping it now as it will always be inactive essentially.
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
The gadget snap for uc20 got updated recently and no longer
includes "snap_core=" in the kernel commandline. This means
that some of the services that are supposed to run on all
core devices do not run on UC20 today.
This PR updates the check so that snapd_recovery_mode is also
recognized as a valid ubuntu core commandline.