Commit 8c45b567 authored by Tails developers's avatar Tails developers
Browse files

Actually, only "source" the variable assignment we expect.

parent 7fc7e680
......@@ -100,11 +100,12 @@ if [ -r "${NM_ENV_FILE}" ]; then
# script. Note that while the regex used for deciding IP addresses
# is far from perfect, it serves our purpose here.
if grep -v "^IP4_NAMESERVERS=\"${IP4_REGEX}\"$" "${NM_ENV_FILE}"; then
if grep -v "${NAMESERVERS_REGEX}" "${NM_ENV_FILE}"; then
error "`gettext \"NetworkManager passed us garbage data when trying to deduce the clearnet DNS server.\"`"
# Import the IP4_NAMESERVERS variable.
. "${NM_ENV_FILE}"
eval "$(grep "${NAMESERVERS_REGEX}" "${NM_ENV_FILE}")"
# ... otherwise fail.
# FIXME: Or would it make sense to fallback to Google's DNS or OpenDNS?
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment