From 6cb6666c9783700613e700a4162cd09bf59daf9d Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 14 Aug 2017 23:58:12 -0700 Subject: [PATCH] ssh: Add umdns entry to the init script. This is usefull for hosts to discover the ssh server, especially on macOS. Signed-off-by: Rosen Penev --- net/openssh/Makefile | 2 +- net/openssh/files/sshd.init | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/net/openssh/Makefile b/net/openssh/Makefile index 34b8e159b..1abc1532e 100644 --- a/net/openssh/Makefile +++ b/net/openssh/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssh PKG_VERSION:=7.5p1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ diff --git a/net/openssh/files/sshd.init b/net/openssh/files/sshd.init index c4354bb2a..a75daae4c 100644 --- a/net/openssh/files/sshd.init +++ b/net/openssh/files/sshd.init @@ -20,7 +20,11 @@ start_service() { }; done mkdir -m 0700 -p /var/empty + local lport=`grep ^Port /etc/ssh/sshd_config | cut -d " " -f 2` + [ -z $lport ] && lport=22 + procd_open_instance + procd_add_mdns "ssh" "tcp" "$lport" procd_set_param command $PROG -D procd_close_instance }