openssh_5.9p1.bbappend: add systemd units

Signed-off-by: Klaus Kurzmann <mok@fluxnetz.de>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Klaus Kurzmann
2011-12-12 16:23:15 +00:00
committed by Koen Kooi
parent 7ad9db8b3b
commit e550e77ca9
4 changed files with 52 additions and 0 deletions
@@ -0,0 +1,11 @@
[Unit]
Conflicts=sshd.service
[Socket]
ExecStartPre=/bin/mkdir -p /var/run/sshd
ListenStream=22
Accept=yes
[Install]
WantedBy=sockets.target
Also=sshdgenkeys.service
@@ -0,0 +1,9 @@
[Unit]
Description=OpenSSH Per-Connection Daemon
After=sshdgenkeys.service
[Service]
ExecStart=-/usr/sbin/sshd -i
ExecReload=/bin/kill -HUP $MAINPID
StandardInput=socket
StandardError=syslog
@@ -0,0 +1,10 @@
[Unit]
Description=SSH Key Generation
[Service]
ExecStart=/usr/bin/ssh-keygen -A
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,22 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
PRINC := "${@int(PRINC) + 1}"
SYSTEMD_PACKAGES = "openssh-sshd-systemd"
SYSTEMD_SERVICE = "sshd.socket"
inherit systemd
SRC_URI += "file://sshd.socket file://sshd@.service file://sshdgenkeys.service"
do_install_append() {
install -d ${D}${base_libdir}/systemd/system
install -m 644 ${WORKDIR}/sshd.socket ${D}${base_libdir}/systemd/system
install -m 644 ${WORKDIR}/sshd@.service ${D}${base_libdir}/systemd/system
install -m 644 ${WORKDIR}/sshdgenkeys.service ${D}${base_libdir}/systemd/system
}
PACKAGES =+ "openssh-sshd-systemd"
FILES_openssh-sshd-systemd += "${base_libdir}/systemd"
RDEPENDS_openssh-sshd-systemd += "openssh-sshd"