From d1c2eb285e9e39be4561f0e13f6c322c04871bad Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Tue, 3 Jun 2014 17:47:56 +0200 Subject: [PATCH] slightly change systemd units logic - use sshd-keygen.service (#1066615) --- sshd-keygen.service | 3 +++ sshd.service | 4 ++-- sshd@.service | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sshd-keygen.service b/sshd-keygen.service index b1eb508..a27d4f6 100644 --- a/sshd-keygen.service +++ b/sshd-keygen.service @@ -2,7 +2,10 @@ 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 +PartOf=sshd.service sshd.socket [Service] ExecStart=/usr/sbin/sshd-keygen Type=oneshot +RemainAfterExit=yes diff --git a/sshd.service b/sshd.service index 6348bc1..4e3ea9b 100644 --- a/sshd.service +++ b/sshd.service @@ -1,10 +1,10 @@ [Unit] Description=OpenSSH server daemon -After=syslog.target network.target auditd.service +After=network.target sshd-keygen.service +Wants=sshd-keygen.service [Service] EnvironmentFile=/etc/sysconfig/sshd -ExecStartPre=/usr/sbin/sshd-keygen ExecStart=/usr/sbin/sshd -D $OPTIONS ExecReload=/bin/kill -HUP $MAINPID KillMode=process diff --git a/sshd@.service b/sshd@.service index ac1b8e0..0189d71 100644 --- a/sshd@.service +++ b/sshd@.service @@ -1,7 +1,7 @@ [Unit] Description=OpenSSH per-connection server daemon Wants=sshd-keygen.service -After=auditd.service sshd-keygen.service +After=sshd-keygen.service [Service] EnvironmentFile=-/etc/sysconfig/sshd