dropbear/dropbearkey.service: Allow extra arguments for key generation

Just like the "init" version this script, pass $DROPBEAR_RSAKEY_ARGS to the
'dropbearkey' program when generating a host key.

This allows to speed up SSH connections on read-only root systems by adding
the line DROPBEAR_RSAKEY_ARGS="-s 1024" into /etc/default/dropbear.

See also: c0efbcb47ab3 ("dropbear/init: Allow extra arguments for key generation")

(From OE-Core rev: 3ae2c70fe83bc242b7a13655bc38431c81033c66)

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Mike Looijmans 2025-03-28 07:47:41 +01:00 committed by Richard Purdie
parent 37b54ce75e
commit 07ab691bd9

View File

@ -9,6 +9,6 @@ Environment="DROPBEAR_RSAKEY_DIR=/etc/dropbear"
EnvironmentFile=-/etc/default/dropbear
Type=oneshot
ExecStart=@BASE_BINDIR@/mkdir -p ${DROPBEAR_RSAKEY_DIR}
ExecStart=@SBINDIR@/dropbearkey -t rsa -f ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key
ExecStart=@SBINDIR@/dropbearkey -t rsa -f ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key $DROPBEAR_RSAKEY_ARGS
RemainAfterExit=yes
Nice=10