mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-25 01:43:22 +00:00
22 lines
451 B
Plaintext
Executable File
22 lines
451 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
|
|
# A few users have reported not being able to access the nameserver on OSX
|
|
# If a lookup fails, fall back to Google public nameserver
|
|
|
|
depend()
|
|
{
|
|
after networking
|
|
}
|
|
|
|
start()
|
|
{
|
|
[ -d /sys/bus/vmbus ] && exit 0
|
|
|
|
ebegin "Testing DNS resolution"
|
|
|
|
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"
|
|
}
|