summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dropbear/dropbear
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-01-16 04:24:53 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-28 00:52:31 +0000
commitab2e677df0a95dc52b32401fa77f63710f346c54 (patch)
tree0a3010737315bcb6deb687be7e404dfe763f974d /meta/recipes-core/dropbear/dropbear
parent330e5ebd1f66f01736b8121c6641ae00afc1010a (diff)
downloadpoky-ab2e677df0a95dc52b32401fa77f63710f346c54.tar.gz
dropbear: add systemd unit files
This patch mainly comes from meta-systemd with a few modifications. The purpose is to get rid of the LSB init scripts in systemd images. [YOCTO #4420] (From OE-Core rev: 5d90c5ebdb899b2951c97a94ff57867c1e491c15) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/dropbear/dropbear')
-rw-r--r--meta/recipes-core/dropbear/dropbear/dropbear.socket10
-rw-r--r--meta/recipes-core/dropbear/dropbear/dropbear@.service11
-rw-r--r--meta/recipes-core/dropbear/dropbear/dropbearkey.service8
3 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-core/dropbear/dropbear/dropbear.socket b/meta/recipes-core/dropbear/dropbear/dropbear.socket
new file mode 100644
index 0000000000..e5c61b755e
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/dropbear.socket
@@ -0,0 +1,10 @@
1[Unit]
2Conflicts=dropbear.service
3
4[Socket]
5ListenStream=22
6Accept=yes
7
8[Install]
9WantedBy=sockets.target
10Also=dropbearkey.service
diff --git a/meta/recipes-core/dropbear/dropbear/dropbear@.service b/meta/recipes-core/dropbear/dropbear/dropbear@.service
new file mode 100644
index 0000000000..6fe9942090
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/dropbear@.service
@@ -0,0 +1,11 @@
1[Unit]
2Description=SSH Per-Connection Server
3Wants=dropbearkey.service
4After=syslog.target dropbearkey.service
5
6[Service]
7EnvironmentFile=-/etc/default/dropbear
8ExecStart=-@SBINDIR@/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key $DROPBEAR_EXTRA_ARGS
9ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
10StandardInput=socket
11KillMode=process
diff --git a/meta/recipes-core/dropbear/dropbear/dropbearkey.service b/meta/recipes-core/dropbear/dropbear/dropbearkey.service
new file mode 100644
index 0000000000..ccc21d5cca
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/dropbearkey.service
@@ -0,0 +1,8 @@
1[Unit]
2Description=SSH Key Generation
3ConditionPathExists=|!/etc/dropbear/dropbear_rsa_host_key
4
5[Service]
6Type=oneshot
7ExecStart=@SBINDIR@/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
8RemainAfterExit=yes