Browse Source

Fix resolv when all options are not defined

tags/2016.12
Filip Pytloun 9 years ago
parent
commit
c72cc618e3
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      linux/files/resolv.conf

+ 3
- 3
linux/files/resolv.conf View File

@@ -1,14 +1,14 @@
{%- from "linux/map.jinja" import network with context %}# Dynamic resolv.conf(5) file for glibc resolver(3) generated by salt-minion(1)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
{% if network.resolv.search -%}
{% if network.resolv.get('search', False) -%}
search {{ network.resolv.search|join(' ') }}
{%- endif %}
{% if network.resolv.domain -%}
{% if network.resolv.get('domain' False) -%}
domain {{ network.resolv.domain }}
{%- endif %}
{%- for nameserver in network.resolv.dns %}
nameserver {{ nameserver }}
{%- endfor %}
{%- if network.resolv.options %}
{%- if network.resolv.get('options', False) %}
options {{ options|sort|join(' ') }}
{%- endif %}

Loading…
Cancel
Save