mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
d592abd255
commit
833bfd3448
@@ -4,8 +4,9 @@ Wants=dropbearkey.service
|
||||
After=syslog.target dropbearkey.service
|
||||
|
||||
[Service]
|
||||
Environment="DROPBEAR_RSAKEY_DIR=/etc/dropbear"
|
||||
EnvironmentFile=-/etc/default/dropbear
|
||||
ExecStart=-@SBINDIR@/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key $DROPBEAR_EXTRA_ARGS
|
||||
ExecStart=-@SBINDIR@/dropbear -i -r ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key $DROPBEAR_EXTRA_ARGS
|
||||
ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
|
||||
StandardInput=socket
|
||||
KillMode=process
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
[Unit]
|
||||
Description=SSH Key Generation
|
||||
ConditionPathExists=|!/etc/dropbear/dropbear_rsa_host_key
|
||||
RequiresMountsFor=/var /var/lib
|
||||
ConditionPathExists=!/etc/dropbear/dropbear_rsa_host_key
|
||||
ConditionPathExists=!/var/lib/dropbear/dropbear_rsa_host_key
|
||||
|
||||
[Service]
|
||||
Environment="DROPBEAR_RSAKEY_DIR=/etc/dropbear"
|
||||
EnvironmentFile=-/etc/default/dropbear
|
||||
Type=oneshot
|
||||
ExecStart=@SBINDIR@/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
|
||||
ExecStart=@BASE_BINDIR@/mkdir -p ${DROPBEAR_RSAKEY_DIR}
|
||||
ExecStart=@SBINDIR@/dropbearkey -t rsa -f ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key
|
||||
RemainAfterExit=yes
|
||||
|
||||
Reference in New Issue
Block a user