diff options
author | Ryan Harper <ryan.harper@canonical.com> | 2021-10-12 09:31:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-12 09:31:36 -0500 |
commit | b3e31ba228d32c318872fb68edda272f679e1004 (patch) | |
tree | a942dc0ee783dfafa9884b5cf566434c48efacfd /setup.py | |
parent | 76166caff42b82aa55c6bcd9528f2c1e3575232a (diff) | |
download | vyos-cloud-init-b3e31ba228d32c318872fb68edda272f679e1004.tar.gz vyos-cloud-init-b3e31ba228d32c318872fb68edda272f679e1004.zip |
Inhibit sshd-keygen@.service if cloud-init is active (#1028)
In some cloud-init enabled images the sshd-keygen@.service
may race with cloud-init and prevent ssh host keys from being
generated or generating host keys twice slowing boot and consuming
additional entropy during boot. This drop-in unit adds a condition to
the sshd-keygen@.service which prevents running if cloud-init is active.
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -40,6 +40,7 @@ def is_generator(p): def pkg_config_read(library, var): fallbacks = { 'systemd': { + 'systemdsystemconfdir': '/etc/systemd/system', 'systemdsystemunitdir': '/lib/systemd/system', 'systemdsystemgeneratordir': '/lib/systemd/system-generators', } @@ -270,7 +271,9 @@ if not platform.system().endswith('BSD'): (ETC + '/NetworkManager/dispatcher.d/', ['tools/hook-network-manager']), (ETC + '/dhcp/dhclient-exit-hooks.d/', ['tools/hook-dhclient']), - (LIB + '/udev/rules.d', [f for f in glob('udev/*.rules')]) + (LIB + '/udev/rules.d', [f for f in glob('udev/*.rules')]), + (ETC + '/systemd/system/sshd-keygen@.service.d/', + ['systemd/disable-sshd-keygen-if-cloud-init-active.conf']), ]) # Use a subclass for install that handles # adding on the right init system configuration files |