Patchwork [meta-systemd] dropbear: read configuration from /etc/default/dropbear

login
register
mail settings
Submitter Enrico Scholz
Date Jan. 22, 2013, 3 p.m.
Message ID <1358866841-31063-1-git-send-email-enrico.scholz@sigma-chemnitz.de>
Download mbox | patch
Permalink /patch/43193/
State Accepted, archived
Commit a32c030a6d3d1768a73f87c74f6e6558f0579ec0
Headers show

Comments

Enrico Scholz - Jan. 22, 2013, 3 p.m.
Patch allows to specify additional parameters (e.g. '-B') by reading
/etc/default/dropbear as a systemd environment file.  It applies
$DROPBEAR_EXTRA_ARGS which used already by the oe-core sysv initscript.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
 meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Martin Jansa - Jan. 28, 2013, 10:38 a.m.
On Tue, Jan 22, 2013 at 04:00:41PM +0100, Enrico Scholz wrote:
> Patch allows to specify additional parameters (e.g. '-B') by reading
> /etc/default/dropbear as a systemd environment file.  It applies
> $DROPBEAR_EXTRA_ARGS which used already by the oe-core sysv initscript.

Applied, thanks

> 
> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> ---
>  meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service b/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service
> index 4fba3f0..813788f 100644
> --- a/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service
> +++ b/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service
> @@ -4,6 +4,7 @@ Requires=dropbearkey.service
>  After=syslog.target dropbearkey.service
>  
>  [Service]
> -ExecStart=-/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -p 22
> +EnvironmentFile=-/etc/default/dropbear
> +ExecStart=-/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -p 22 $DROPBEAR_EXTRA_ARGS
>  ExecReload=/bin/kill -HUP $MAINPID
>  StandardInput=socket
> -- 
> 1.7.11.7
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Patch

diff --git a/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service b/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service
index 4fba3f0..813788f 100644
--- a/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service
+++ b/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service
@@ -4,6 +4,7 @@  Requires=dropbearkey.service
 After=syslog.target dropbearkey.service
 
 [Service]
-ExecStart=-/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -p 22
+EnvironmentFile=-/etc/default/dropbear
+ExecStart=-/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -p 22 $DROPBEAR_EXTRA_ARGS
 ExecReload=/bin/kill -HUP $MAINPID
 StandardInput=socket