systemd: move distro-specific unit dependencies to drop-ins
While many distributions use systemd, they do not necessarily share
a common nomenclature for services. This change moves
distribution-specific information into systemd drop-in files (see
systemd.unit(5)).
This allows the systemd unit files to be used verbatim on most
systemd-based distributions, while providing a mechanism for packages
to provide additional metadata for service ordering (or other
configuration).
Python 3 would fail to load yaml from doc/examples/cloud-config-apt.txt
when the LANG (specifically LC_CTYPE) was 'C'.
The changes here do 2 things:
a.) remove the non-ascii characters from the yaml file.
b.) fix the validate-yaml.py program to decode using utf-8 specifically
rather than using the inherited settings.
This fixes it now for ascii and in the future also should non-ascii slip in.
tests: fix assumptions that expected no eth0 in system.
The previous commit added tests that would fail on any system that had
a nic named eth0 or eno1. The changes here supply the expected macs to
the function being tested so it does not query the system.
Instead of being dependent on the availability of syslog that
various distributions may not enable or configure correctly
or they do so via patches just use a known-to-work default
logging mechanism. If distros want to change this, that
is fine, but at least the built-in one will work reliably.
This replaces long single lines in a log or console output
with multiple lines that are much easier to read.
It indents the stdout and stderr so logs are more easily
read also.