Fix empty resolv.conf search field error

This commit is contained in:
Андрей Лимачко 2022-12-20 18:30:59 +04:00
parent c85b07bed1
commit 3e01df34d6
Signed by untrusted user: liannnix
GPG Key ID: 1D8EEB2E408272C0

View File

@ -646,7 +646,7 @@ init_vars()
SEARCH_DOMAIN=
if test -f /etc/resolv.conf; then
SEARCH_DOMAIN=$(grep "^search\s\+" /etc/resolv.conf | sed -e 's/^search\s\+//' -e 's/\s/\n/' | head -1)
SEARCH_DOMAIN=$(grep "^search\s\+" /etc/resolv.conf || true | sed -e 's/^search\s\+//' -e 's/\s/\n/' | head -1 )
fi
KRB5_DEFAULT_REALM=