aboutsummaryrefslogtreecommitdiffstats
path: root/meta-systemd/oe-core
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2013-04-13 13:23:05 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2013-04-15 16:22:02 +0200
commit1fb0eacf0349c4b886e89aea275f43b973b78245 (patch)
tree55fb9f1ae8acade3cdba09adf6a002f6350eebff /meta-systemd/oe-core
parent7be95a25e0c794a5b4e308185242e284447da288 (diff)
downloadmeta-openembedded-1fb0eacf0349c4b886e89aea275f43b973b78245.tar.gz
meta-openembedded-1fb0eacf0349c4b886e89aea275f43b973b78245.tar.bz2
meta-openembedded-1fb0eacf0349c4b886e89aea275f43b973b78245.zip
dropbear: move bbappend to oe-core subdirectory
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-systemd/oe-core')
-rw-r--r--meta-systemd/oe-core/recipes-core/dropbear/dropbear/dropbear.socket10
-rw-r--r--meta-systemd/oe-core/recipes-core/dropbear/dropbear/dropbear@.service10
-rw-r--r--meta-systemd/oe-core/recipes-core/dropbear/dropbear/dropbearkey.service10
-rw-r--r--meta-systemd/oe-core/recipes-core/dropbear/dropbear_2012.55.bbappend23
4 files changed, 53 insertions, 0 deletions
diff --git a/meta-systemd/oe-core/recipes-core/dropbear/dropbear/dropbear.socket b/meta-systemd/oe-core/recipes-core/dropbear/dropbear/dropbear.socket
new file mode 100644
index 000000000..e5c61b755
--- /dev/null
+++ b/meta-systemd/oe-core/recipes-core/dropbear/dropbear/dropbear.socket
@@ -0,0 +1,10 @@
+[Unit]
+Conflicts=dropbear.service
+
+[Socket]
+ListenStream=22
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
+Also=dropbearkey.service
diff --git a/meta-systemd/oe-core/recipes-core/dropbear/dropbear/dropbear@.service b/meta-systemd/oe-core/recipes-core/dropbear/dropbear/dropbear@.service
new file mode 100644
index 000000000..813788fe3
--- /dev/null
+++ b/meta-systemd/oe-core/recipes-core/dropbear/dropbear/dropbear@.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=SSH Per-Connection Server
+Requires=dropbearkey.service
+After=syslog.target dropbearkey.service
+
+[Service]
+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
diff --git a/meta-systemd/oe-core/recipes-core/dropbear/dropbear/dropbearkey.service b/meta-systemd/oe-core/recipes-core/dropbear/dropbear/dropbearkey.service
new file mode 100644
index 000000000..7f03000eb
--- /dev/null
+++ b/meta-systemd/oe-core/recipes-core/dropbear/dropbear/dropbearkey.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=SSH Key Generation
+ConditionPathExists=|!/etc/dropbear/dropbear_rsa_host_key
+
+[Service]
+ExecStart=/usr/sbin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-systemd/oe-core/recipes-core/dropbear/dropbear_2012.55.bbappend b/meta-systemd/oe-core/recipes-core/dropbear/dropbear_2012.55.bbappend
new file mode 100644
index 000000000..23e282000
--- /dev/null
+++ b/meta-systemd/oe-core/recipes-core/dropbear/dropbear_2012.55.bbappend
@@ -0,0 +1,23 @@
+inherit systemd
+
+PRINC := "${@int(PRINC) + 4}"
+
+# look for files in the layer first
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://dropbearkey.service \
+ file://dropbear@.service \
+ file://dropbear.socket"
+
+RPROVIDES_${PN} += "${PN}-systemd"
+RREPLACES_${PN} += "${PN}-systemd"
+RCONFLICTS_${PN} += "${PN}-systemd"
+SYSTEMD_SERVICE_${PN} = "dropbear.socket"
+
+do_install_append() {
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dropbearkey.service ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dropbear@.service ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/dropbear.socket ${D}${systemd_unitdir}/system
+ ln -sf /dev/null ${D}${systemd_unitdir}/system/dropbear.service
+}