diff options
author | Gustavo Zacarias <gustavo@zacarias.com.ar> | 2013-12-04 07:37:53 -0300 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2013-12-04 11:50:51 +0100 |
commit | c19308020bb8c7646dddb351f4070edc2dcbfe8f (patch) | |
tree | 5d65b7d67204d16dc36b75dcb6fc63e75590b0a4 /package/openssh | |
parent | e18b3177702e071ed5385e821a0bef937ff67570 (diff) | |
download | buildroot-c19308020bb8c7646dddb351f4070edc2dcbfe8f.tar.gz buildroot-c19308020bb8c7646dddb351f4070edc2dcbfe8f.zip |
openssh: add systemd unit file
And only install sysV-style script when appropiate.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/openssh')
-rw-r--r-- | package/openssh/openssh.mk | 13 | ||||
-rw-r--r-- | package/openssh/sshd.service | 11 |
2 files changed, 21 insertions, 3 deletions
diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk index 8ab2b476ed..60b65af331 100644 --- a/package/openssh/openssh.mk +++ b/package/openssh/openssh.mk @@ -17,10 +17,17 @@ OPENSSH_DEPENDENCIES += linux-pam OPENSSH_CONF_OPT += --with-pam endif -define OPENSSH_INSTALL_INITSCRIPT - $(INSTALL) -D -m 755 package/openssh/S50sshd $(TARGET_DIR)/etc/init.d/S50sshd +define OPENSSH_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/openssh/sshd.service \ + $(TARGET_DIR)/etc/systemd/system/sshd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../sshd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/sshd.service endef -OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_INITSCRIPT +define OPENSSH_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/openssh/S50sshd \ + $(TARGET_DIR)/etc/init.d/S50sshd +endef $(eval $(autotools-package)) diff --git a/package/openssh/sshd.service b/package/openssh/sshd.service new file mode 100644 index 0000000000..b5e96b3a25 --- /dev/null +++ b/package/openssh/sshd.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenSSH server daemon +After=syslog.target network.target auditd.service + +[Service] +ExecStartPre=/usr/bin/ssh-keygen -A +ExecStart=/usr/sbin/sshd -D -e +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target |