[openssh/private-master-vanilla] slightly change systemd units logic - use sshd-keygen.service (#1066615)
Petr Lautrbach
plautrba at fedoraproject.org
Mon Sep 1 11:14:09 UTC 2014
commit 3ca3052f06b06629543911e8e10713dc92f943ee
Author: Petr Lautrbach <plautrba at redhat.com>
Date: Tue Jun 3 17:47:56 2014 +0200
slightly change systemd units logic - use sshd-keygen.service (#1066615)
sshd-keygen.service | 3 +++
sshd.service | 4 ++--
sshd at .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 at .service b/sshd at .service
index ac1b8e0..0189d71 100644
--- a/sshd at .service
+++ b/sshd at .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
More information about the scm-commits
mailing list