diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2015-09-30 15:53:18 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-01 07:43:37 +0100 |
commit | 833bfd34485c7e7b567548b71e90aeff089e3c64 (patch) | |
tree | cb18f8e85f83a261a7a3bb2de05f3081103bca4c /meta/recipes-core | |
parent | d592abd25537c812f0a89f1ac4925a8d63271046 (diff) | |
download | poky-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/recipes-core')
-rw-r--r-- | meta/recipes-core/dropbear/dropbear/dropbear@.service | 3 | ||||
-rw-r--r-- | meta/recipes-core/dropbear/dropbear/dropbearkey.service | 9 |
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 | |||
4 | After=syslog.target dropbearkey.service | 4 | After=syslog.target dropbearkey.service |
5 | 5 | ||
6 | [Service] | 6 | [Service] |
7 | Environment="DROPBEAR_RSAKEY_DIR=/etc/dropbear" | ||
7 | EnvironmentFile=-/etc/default/dropbear | 8 | EnvironmentFile=-/etc/default/dropbear |
8 | ExecStart=-@SBINDIR@/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key $DROPBEAR_EXTRA_ARGS | 9 | ExecStart=-@SBINDIR@/dropbear -i -r ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key $DROPBEAR_EXTRA_ARGS |
9 | ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID | 10 | ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID |
10 | StandardInput=socket | 11 | StandardInput=socket |
11 | KillMode=process | 12 | KillMode=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] |
2 | Description=SSH Key Generation | 2 | Description=SSH Key Generation |
3 | ConditionPathExists=|!/etc/dropbear/dropbear_rsa_host_key | 3 | RequiresMountsFor=/var /var/lib |
4 | ConditionPathExists=!/etc/dropbear/dropbear_rsa_host_key | ||
5 | ConditionPathExists=!/var/lib/dropbear/dropbear_rsa_host_key | ||
4 | 6 | ||
5 | [Service] | 7 | [Service] |
8 | Environment="DROPBEAR_RSAKEY_DIR=/etc/dropbear" | ||
9 | EnvironmentFile=-/etc/default/dropbear | ||
6 | Type=oneshot | 10 | Type=oneshot |
7 | ExecStart=@SBINDIR@/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key | 11 | ExecStart=@BASE_BINDIR@/mkdir -p ${DROPBEAR_RSAKEY_DIR} |
12 | ExecStart=@SBINDIR@/dropbearkey -t rsa -f ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key | ||
8 | RemainAfterExit=yes | 13 | RemainAfterExit=yes |