From af94f46861844cbd6ba4162115039bebcc8f78ba Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Jan 12 2016 12:14:58 +0000 Subject: Fix condition to run sshd-keygen When the first boot fails for some reason and the host keys files are created, but the content not synced into the disk, during the second boot, the keygen is not run, but the sshd will not start. Changing condition mitigates this case. --- diff --git a/sshd-keygen.service b/sshd-keygen.service index a27d4f6..77cffeb 100644 --- a/sshd-keygen.service +++ b/sshd-keygen.service @@ -1,8 +1,8 @@ [Unit] Description=OpenSSH Server Key Generation -ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key -ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key -ConditionPathExists=|!/etc/ssh/ssh_host_ed25519_key +ConditionFileNotEmpty=|!/etc/ssh/ssh_host_rsa_key +ConditionFileNotEmpty=|!/etc/ssh/ssh_host_ecdsa_key +ConditionFileNotEmpty=|!/etc/ssh/ssh_host_ed25519_key PartOf=sshd.service sshd.socket [Service]