mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-16 06:30:16 +00:00
dropbear: move systemd support to meta-systemd
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
committed by
Koen Kooi
parent
42e00e8ffd
commit
0cee7e28f0
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Conflicts=dropbear.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=22
|
||||
Accept=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
Also=dropbearkey.service
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=SSH Per-Connection Server
|
||||
Requires=dropbearkey.service
|
||||
After=syslog.target dropbearkey.service
|
||||
|
||||
[Service]
|
||||
ExecStart=-/usr/sbin/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key -p 22
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
StandardInput=socket
|
||||
@@ -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
|
||||
@@ -0,0 +1,17 @@
|
||||
inherit systemd
|
||||
|
||||
PRINC := "${@int(PRINC) + 3}"
|
||||
|
||||
# look for files in the layer first
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI += "file://dropbearkey.service \
|
||||
file://dropbear@.service \
|
||||
file://dropbear.socket"
|
||||
|
||||
SYSTEMD_PACKAGES = "${PN}-systemd"
|
||||
SYSTEMD_SERVICE_${PN}-systemd = "dropbear.socket"
|
||||
|
||||
do_install_append() {
|
||||
ln -sf /dev/null ${D}${systemd_unitdir}/system/dropbear.service
|
||||
}
|
||||
Reference in New Issue
Block a user