summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2015-09-30 15:53:18 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-01 07:43:37 +0100
commit833bfd34485c7e7b567548b71e90aeff089e3c64 (patch)
treecb18f8e85f83a261a7a3bb2de05f3081103bca4c /meta
parentd592abd25537c812f0a89f1ac4925a8d63271046 (diff)
downloadpoky-833bfd34485c7e7b567548b71e90aeff089e3c64.tar.gz
dropbear: fix key generation when systemd is in use and rootfs is readonly
(From OE-Core rev: 7e13fc603aa86219bf15e355ca9ea9275308cca5) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/dropbear/dropbear/dropbear@.service3
-rw-r--r--meta/recipes-core/dropbear/dropbear/dropbearkey.service9
2 files changed, 9 insertions, 3 deletions
diff --git a/meta/recipes-core/dropbear/dropbear/dropbear@.service b/meta/recipes-core/dropbear/dropbear/dropbear@.service
index 6fe9942090..b420bcddcb 100644
--- a/meta/recipes-core/dropbear/dropbear/dropbear@.service
+++ b/meta/recipes-core/dropbear/dropbear/dropbear@.service
@@ -4,8 +4,9 @@ Wants=dropbearkey.service
4After=syslog.target dropbearkey.service 4After=syslog.target dropbearkey.service
5 5
6[Service] 6[Service]
7Environment="DROPBEAR_RSAKEY_DIR=/etc/dropbear"
7EnvironmentFile=-/etc/default/dropbear 8EnvironmentFile=-/etc/default/dropbear
8ExecStart=-@SBINDIR@/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key $DROPBEAR_EXTRA_ARGS 9ExecStart=-@SBINDIR@/dropbear -i -r ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key $DROPBEAR_EXTRA_ARGS
9ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID 10ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
10StandardInput=socket 11StandardInput=socket
11KillMode=process 12KillMode=process
diff --git a/meta/recipes-core/dropbear/dropbear/dropbearkey.service b/meta/recipes-core/dropbear/dropbear/dropbearkey.service
index ccc21d5cca..c49053d57c 100644
--- a/meta/recipes-core/dropbear/dropbear/dropbearkey.service
+++ b/meta/recipes-core/dropbear/dropbear/dropbearkey.service
@@ -1,8 +1,13 @@
1[Unit] 1[Unit]
2Description=SSH Key Generation 2Description=SSH Key Generation
3ConditionPathExists=|!/etc/dropbear/dropbear_rsa_host_key 3RequiresMountsFor=/var /var/lib
4ConditionPathExists=!/etc/dropbear/dropbear_rsa_host_key
5ConditionPathExists=!/var/lib/dropbear/dropbear_rsa_host_key
4 6
5[Service] 7[Service]
8Environment="DROPBEAR_RSAKEY_DIR=/etc/dropbear"
9EnvironmentFile=-/etc/default/dropbear
6Type=oneshot 10Type=oneshot
7ExecStart=@SBINDIR@/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key 11ExecStart=@BASE_BINDIR@/mkdir -p ${DROPBEAR_RSAKEY_DIR}
12ExecStart=@SBINDIR@/dropbearkey -t rsa -f ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key
8RemainAfterExit=yes 13RemainAfterExit=yes