diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-01-16 04:24:53 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-28 00:52:31 +0000 |
commit | ab2e677df0a95dc52b32401fa77f63710f346c54 (patch) | |
tree | 0a3010737315bcb6deb687be7e404dfe763f974d /meta/recipes-core/dropbear/dropbear | |
parent | 330e5ebd1f66f01736b8121c6641ae00afc1010a (diff) | |
download | poky-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.socket | 10 | ||||
-rw-r--r-- | meta/recipes-core/dropbear/dropbear/dropbear@.service | 11 | ||||
-rw-r--r-- | meta/recipes-core/dropbear/dropbear/dropbearkey.service | 8 |
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] | ||
2 | Conflicts=dropbear.service | ||
3 | |||
4 | [Socket] | ||
5 | ListenStream=22 | ||
6 | Accept=yes | ||
7 | |||
8 | [Install] | ||
9 | WantedBy=sockets.target | ||
10 | Also=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] | ||
2 | Description=SSH Per-Connection Server | ||
3 | Wants=dropbearkey.service | ||
4 | After=syslog.target dropbearkey.service | ||
5 | |||
6 | [Service] | ||
7 | EnvironmentFile=-/etc/default/dropbear | ||
8 | ExecStart=-@SBINDIR@/dropbear -i -r /etc/dropbear/dropbear_rsa_host_key $DROPBEAR_EXTRA_ARGS | ||
9 | ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID | ||
10 | StandardInput=socket | ||
11 | KillMode=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] | ||
2 | Description=SSH Key Generation | ||
3 | ConditionPathExists=|!/etc/dropbear/dropbear_rsa_host_key | ||
4 | |||
5 | [Service] | ||
6 | Type=oneshot | ||
7 | ExecStart=@SBINDIR@/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key | ||
8 | RemainAfterExit=yes | ||