summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2015-09-30 15:53:16 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-01 07:43:37 +0100
commit299806d0dcb77271cb004b032cbfd83aa6fc4a00 (patch)
tree72dce965887972aa3f63133a69cec6ec7154c904 /meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
parent006497e36a78dd184457330a3d9c67f9dad6e3bb (diff)
downloadpoky-299806d0dcb77271cb004b032cbfd83aa6fc4a00.tar.gz
openssh: fix sshd key generation when systemd is in use and rootfs is readonly
[YOCTO #8365] (From OE-Core rev: d5ea131fe94939daabee1afe8219683de259b7a3) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service')
-rw-r--r--meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service21
1 files changed, 16 insertions, 5 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
index d65086fc8a..148e6ad63a 100644
--- a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
+++ b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service
@@ -1,11 +1,22 @@
1[Unit] 1[Unit]
2Description=OpenSSH Key Generation 2Description=OpenSSH Key Generation
3ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key 3RequiresMountsFor=/var /run
4ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key 4ConditionPathExists=!/var/run/ssh/ssh_host_rsa_key
5ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key 5ConditionPathExists=!/var/run/ssh/ssh_host_dsa_key
6ConditionPathExists=|!/etc/ssh/ssh_host_ed25519_key 6ConditionPathExists=!/var/run/ssh/ssh_host_ecdsa_key
7ConditionPathExists=!/var/run/ssh/ssh_host_ed25519_key
8ConditionPathExists=!/etc/ssh/ssh_host_rsa_key
9ConditionPathExists=!/etc/ssh/ssh_host_dsa_key
10ConditionPathExists=!/etc/ssh/ssh_host_ecdsa_key
11ConditionPathExists=!/etc/ssh/ssh_host_ed25519_key
7 12
8[Service] 13[Service]
9ExecStart=@BINDIR@/ssh-keygen -A 14Environment="SYSCONFDIR=/etc/ssh"
15EnvironmentFile=-/etc/default/ssh
16ExecStart=@BASE_BINDIR@/mkdir -p $SYSCONFDIR
17ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' -t rsa
18ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' -t dsa
19ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ecdsa_key -N '' -t ecdsa
20ExecStart=@BINDIR@/ssh-keygen -q -f ${SYSCONFDIR}/ssh_host_ed25519_key -N '' -t ed25519
10Type=oneshot 21Type=oneshot
11RemainAfterExit=yes 22RemainAfterExit=yes