mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 01:29:07 +00:00
fix #10 do not run dnsfix if no eth0
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
This commit is contained in:
parent
f596bac5a7
commit
6df16df027
@ -12,7 +12,8 @@ start()
|
|||||||
{
|
{
|
||||||
ebegin "Testing DNS resolution"
|
ebegin "Testing DNS resolution"
|
||||||
|
|
||||||
dig localhost 2>&1 > /dev/null || printf "nameserver 8.8.8.8\nnameserver 8.8.4.4\n" > /etc/resolv.conf
|
ifconfig eth0 2>1 >/dev/null && \
|
||||||
|
(dig localhost 2>&1 > /dev/null || printf "nameserver 8.8.8.8\nnameserver 8.8.4.4\n" > /etc/resolv.conf)
|
||||||
|
|
||||||
eend $? "DNS fix failed"
|
eend $? "DNS fix failed"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user