forked from OpenDingux/buildroot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Joachim Wiberg <[email protected]> Signed-off-by: Thomas Petazzoni <[email protected]>
- Loading branch information
1 parent
210306b
commit 5010cac
Showing
11 changed files
with
167 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
config BR2_PACKAGE_MDNSD | ||
bool "mdnsd" | ||
depends on BR2_USE_MMU # fork() | ||
help | ||
Small mDNS-SD daemon for advertising services and device | ||
discovery, similar to Avahi and Bonjour. | ||
|
||
By default, mdnsd runs on all interfaces that support | ||
multicast. It reads services to announce from | ||
/etc/mdns.d/*.service, a few common services are included | ||
below. To override the defaults, e.g., path to services, | ||
TTL of multicast frames, or the default interface, set | ||
MDNSD_ARGS in /etc/default/mdnsd | ||
|
||
Note: currently no NSS integration with GLIBC. | ||
|
||
https://github.com/troglobit/mdnsd | ||
|
||
if BR2_PACKAGE_MDNSD | ||
|
||
config BR2_PACKAGE_MDNSD_MQUERY | ||
bool "mquery" | ||
help | ||
Scan a LAN for mDNS capable devices, or query specific | ||
records, similar to the mdns-scan tool. Useful for | ||
verifying multicast connectivity or locating neighbors with | ||
link-local address. | ||
|
||
comment "Services to advertise" | ||
|
||
config BR2_PACKAGE_MDNSD_FTP_SERVICE | ||
bool "FTP service" | ||
|
||
config BR2_PACKAGE_MDNSD_HTTP_SERVICE | ||
bool "HTTP service" | ||
|
||
config BR2_PACKAGE_MDNSD_IPP_SERVICE | ||
bool "IPP service" | ||
|
||
config BR2_PACKAGE_MDNSD_PRINTER_SERVICE | ||
bool "Printer service" | ||
|
||
config BR2_PACKAGE_MDNSD_SSH_SERVICE | ||
bool "SSH service" | ||
default y if BR2_PACKAGE_DROPBEAR | ||
default y if BR2_PACKAGE_OPENSSH | ||
default y if BR2_PACKAGE_LIBSSH_SERVER | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/sh | ||
|
||
DAEMON=mdnsd | ||
MDNSD=/usr/sbin/$DAEMON | ||
PIDFILE=/var/run/$DAEMON.pid | ||
CFGFILE=/etc/default/$DAEMON | ||
|
||
MDNSD_ARGS="" | ||
|
||
# Read configuration variable file if it is present | ||
# shellcheck source=/dev/null | ||
[ -r "$CFGFILE" ] && . "$CFGFILE" | ||
|
||
# shellcheck disable=SC2086 | ||
start() { | ||
[ -n "$1" ] || printf 'Starting %s: ' "$DAEMON" | ||
start-stop-daemon -S -q -p "$PIDFILE" -x "$MDNSD" -- $MDNSD_ARGS | ||
} | ||
|
||
stop() { | ||
[ -n "$1" ] || printf 'Stopping %s: ' "$DAEMON" | ||
start-stop-daemon -K -q -p "$PIDFILE" -x "$MDNSD" | ||
} | ||
|
||
restart() { | ||
printf 'Restarting %s: ' "$DAEMON" | ||
stop silent | ||
start silent | ||
} | ||
|
||
# SIGHUP reloads /etc/mdns.d/*.service | ||
reload() { | ||
printf 'Reloading %s: ' "$DAEMON" | ||
start-stop-daemon -K -s HUP -q -p "$PIDFILE" -x "$MDNSD" | ||
} | ||
|
||
case "$1" in | ||
start|stop|restart|reload) | ||
if "$1"; then | ||
echo "OK" | ||
else | ||
echo "FAIL" | ||
fi | ||
;; | ||
*) | ||
echo "Usage: $0 {start|stop|restart|reload}" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
type _ftp._tcp | ||
port 21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
type _http._tcp | ||
port 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
type _ipp._tcp | ||
port 631 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Upstream sha256 from GitHub | ||
sha256 1af8742ab82a0af88d99d0b15508358ad4305879ab039631bea889138f5c87e8 mdnsd-0.12.tar.gz | ||
|
||
# Locally computed | ||
sha256 2969546227b58ce1b431cc4c36c9a9b45d604e6b94fb8b787ea5d3696f3eee3b LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
################################################################################ | ||
# | ||
# mdnsd | ||
# | ||
################################################################################ | ||
|
||
MDNSD_VERSION = 0.12 | ||
MDNSD_SITE = https://github.com/troglobit/mdnsd/releases/download/v$(MDNSD_VERSION) | ||
MDNSD_LICENSE = BSD-3-Clause | ||
MDNSD_LICENSE_FILES = LICENSE | ||
MDNSD_DEPENDENCIES = host-pkgconf | ||
|
||
ifeq ($(BR2_PACKAGE_MDNSD_MQUERY),y) | ||
MDNSD_CONF_OPTS += --with-mquery | ||
else | ||
MDNSD_CONF_OPTS += --without-mquery | ||
endif | ||
|
||
ifeq ($(BR2_PACKAGE_SYSTEMD),y) | ||
MDNSD_DEPENDENCIES += systemd | ||
MDNSD_CONF_OPTS += --with-systemd | ||
else | ||
MDNSD_CONF_OPTS += --without-systemd | ||
endif | ||
|
||
MDNSD_SERVICES_$(BR2_PACKAGE_MDNSD_FTP_SERVICE) += ftp | ||
MDNSD_SERVICES_$(BR2_PACKAGE_MDNSD_HTTP_SERVICE) += http | ||
MDNSD_SERVICES_$(BR2_PACKAGE_MDNSD_IPP_SERVICE) += ipp | ||
MDNSD_SERVICES_$(BR2_PACKAGE_MDNSD_PRINTER_SERVICE) += printer | ||
MDNSD_SERVICES_$(BR2_PACKAGE_MDNSD_SSH_SERVICE) += ssh | ||
|
||
define MDNSD_INSTALL_SERVICES | ||
$(foreach service,$(MDNSD_SERVICES_y),\ | ||
$(INSTALL) -D -m 0644 package/mdnsd/$(service).service \ | ||
$(TARGET_DIR)/etc/mdns.d/$(service).service | ||
) | ||
endef | ||
MDNSD_POST_INSTALL_TARGET_HOOKS += MDNSD_INSTALL_SERVICES | ||
|
||
define MDNSD_INSTALL_INIT_SYSV | ||
$(INSTALL) -m 755 -D package/mdnsd/S50mdnsd \ | ||
$(TARGET_DIR)/etc/init.d/S50mdnsd | ||
endef | ||
|
||
define MDNSD_INSTALL_INIT_SYSTEMD | ||
$(INSTALL) -D -m 644 $(@D)/mdnsd.service \ | ||
$(TARGET_DIR)/usr/lib/systemd/system/mdnsd.service | ||
endef | ||
|
||
$(eval $(autotools-package)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
type _printer._tcp | ||
port 515 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
type _ssh._tcp | ||
port 22 |