Merge pull request #102 from djs55/flip-nics

In a dual NIC config, ensure we use the same NIC for both routing and DNS
This commit is contained in:
Dave Scott 2016-04-18 19:08:50 +01:00
commit 85d42d5c03
2 changed files with 2 additions and 6 deletions

View File

@ -8,3 +8,4 @@ iface eth0 inet dhcp
auto eth1 auto eth1
iface eth1 inet dhcp iface eth1 inet dhcp
udhcpc_opts -T 1 -A 3 udhcpc_opts -T 1 -A 3
metric 199

View File

@ -17,16 +17,11 @@ 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 ${INTF} -hostname ${HOSTNAME} -- -if eth0 -hostname ${HOSTNAME}
eend $? "Failed to start mDNS server" eend $? "Failed to start mDNS server"
} }