summaryrefslogtreecommitdiffstats
path: root/meta-systemd/meta-oe
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2012-06-10 21:46:56 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2012-07-16 09:39:07 +0200
commit0cee7e28f0ad77c8da7067eda7794cdd4576c7e2 (patch)
treefa60324b095f3d1eeee83c92a44d9d44f5ca303c /meta-systemd/meta-oe
parent42e00e8ffd3088050716a5fe1c7da2cc6cf9787c (diff)
downloadmeta-openembedded-0cee7e28f0ad77c8da7067eda7794cdd4576c7e2.tar.gz
dropbear: move systemd support to meta-systemd
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Diffstat (limited to 'meta-systemd/meta-oe')
-rw-r--r--meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear.socket10
-rw-r--r--meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service9
-rw-r--r--meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbearkey.service10
-rw-r--r--meta-systemd/meta-oe/recipes-core/dropbear/dropbear_2012.55.bbappend17
4 files changed, 46 insertions, 0 deletions
diff --git a/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear.socket b/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear.socket
new file mode 100644
index 000000000..e5c61b755
--- /dev/null
+++ b/meta-systemd/meta-oe/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-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service b/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service
new file mode 100644
index 000000000..4fba3f05c
--- /dev/null
+++ b/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbear@.service
@@ -0,0 +1,9 @@
1[Unit]
2Description=SSH Per-Connection Server
3Requires=dropbearkey.service
4After=syslog.target dropbearkey.service
5
6[Service]
7ExecStart=-/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -p 22
8ExecReload=/bin/kill -HUP $MAINPID
9StandardInput=socket
diff --git a/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbearkey.service b/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbearkey.service
new file mode 100644
index 000000000..7f03000eb
--- /dev/null
+++ b/meta-systemd/meta-oe/recipes-core/dropbear/dropbear/dropbearkey.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=SSH Key Generation
3ConditionPathExists=|!/etc/dropbear/dropbear_rsa_host_key
4
5[Service]
6ExecStart=/usr/sbin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
7RemainAfterExit=yes
8
9[Install]
10WantedBy=multi-user.target
diff --git a/meta-systemd/meta-oe/recipes-core/dropbear/dropbear_2012.55.bbappend b/meta-systemd/meta-oe/recipes-core/dropbear/dropbear_2012.55.bbappend
new file mode 100644
index 000000000..15546e1ad
--- /dev/null
+++ b/meta-systemd/meta-oe/recipes-core/dropbear/dropbear_2012.55.bbappend
@@ -0,0 +1,17 @@
1inherit systemd
2
3PRINC := "${@int(PRINC) + 3}"
4
5# look for files in the layer first
6FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
7
8SRC_URI += "file://dropbearkey.service \
9 file://dropbear@.service \
10 file://dropbear.socket"
11
12SYSTEMD_PACKAGES = "${PN}-systemd"
13SYSTEMD_SERVICE_${PN}-systemd = "dropbear.socket"
14
15do_install_append() {
16 ln -sf /dev/null ${D}${systemd_unitdir}/system/dropbear.service
17}