mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 19:05:37 +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
7478cc7c80
commit
67205f62d9
@ -17,11 +17,16 @@ start()
|
|||||||
hostname -F /etc/hostname
|
hostname -F /etc/hostname
|
||||||
export HOSTNAME=$(hostname -s).local.
|
export HOSTNAME=$(hostname -s).local.
|
||||||
|
|
||||||
|
INTF=eth0
|
||||||
|
if [ "$(mobyconfig get network)" = "hybrid" ]; then
|
||||||
|
INTF=eth1
|
||||||
|
fi
|
||||||
|
|
||||||
start-stop-daemon --start --quiet \
|
start-stop-daemon --start --quiet \
|
||||||
--background \
|
--background \
|
||||||
--exec /sbin/mdnstool \
|
--exec /sbin/mdnstool \
|
||||||
--make-pidfile --pidfile ${PIDFILE} \
|
--make-pidfile --pidfile ${PIDFILE} \
|
||||||
-- -if eth0 -hostname ${HOSTNAME}
|
-- -if ${INTF} -hostname ${HOSTNAME}
|
||||||
|
|
||||||
eend $? "Failed to start mDNS server"
|
eend $? "Failed to start mDNS server"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user