mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 11:00:25 +00:00
mdnstool: add support for a "hybrid" network mode
Normally we advertise $(hostname).local. by MDNS on eth0. If the new "hybrid" networking mode is configured, we will use 2 NICs and eth1 will be connected via vmnet, and so we should run MDNS on it. Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
parent
6ca504f192
commit
1477dee600
@ -17,11 +17,16 @@ start()
|
||||
hostname -F /etc/hostname
|
||||
export HOSTNAME=$(hostname -s).local.
|
||||
|
||||
INTF=eth0
|
||||
if [ "$(mobyconfig get network)" = "hybrid" ]; then
|
||||
INTF=eth1
|
||||
fi
|
||||
|
||||
start-stop-daemon --start --quiet \
|
||||
--background \
|
||||
--exec /sbin/mdnstool \
|
||||
--make-pidfile --pidfile ${PIDFILE} \
|
||||
-- -if eth0 -hostname ${HOSTNAME}
|
||||
-- -if ${INTF} -hostname ${HOSTNAME}
|
||||
|
||||
eend $? "Failed to start mDNS server"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user