summaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-08-21 08:46:56 +0200
committerDaniil Baturin <daniil@baturin.org>2019-08-27 08:15:05 +0200
commit8008fb508ec874ada5cb06866c1a0bd4c03be1e9 (patch)
tree1febb3d3746c3ab3e6f42fe4c9783d8f9a6db561 /src/services
parent5824029b4b4aa32048bda3b012eeee1ab6940c63 (diff)
downloadvyos-1x-8008fb508ec874ada5cb06866c1a0bd4c03be1e9.tar.gz
vyos-1x-8008fb508ec874ada5cb06866c1a0bd4c03be1e9.zip
T1598: improve autogenerated file comments.
Diffstat (limited to 'src/services')
-rwxr-xr-xsrc/services/vyos-hostsd9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/services/vyos-hostsd b/src/services/vyos-hostsd
index 972c2e3dc..aec06c72c 100755
--- a/src/services/vyos-hostsd
+++ b/src/services/vyos-hostsd
@@ -38,6 +38,9 @@ HOSTS_FILE = '/etc/hosts'
hosts_tmpl_source = """
### Autogenerated by VyOS ###
+### Do not edit, your changes will get overwritten ###
+
+# Local host
127.0.0.1 localhost
127.0.1.1 {{ host_name }}{% if domain_name %}.{{ domain_name }}{% endif %}
@@ -48,7 +51,7 @@ ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
-
+# From DHCP and "system static host-mapping"
{%- if hosts %}
{% for h in hosts -%}
{{hosts[h]['address']}}\t{{h}}\t{% for a in hosts[h]['aliases'] %} {{a}} {% endfor %}
@@ -60,6 +63,8 @@ hosts_tmpl = jinja2.Template(hosts_tmpl_source)
resolv_tmpl_source = """
### Autogenerated by VyOS ###
+### Do not edit, your changes will get overwritten ###
+
{% for ns in name_servers -%}
nameserver {{ns}}
{% endfor -%}
@@ -83,7 +88,7 @@ resolv_tmpl = jinja2.Template(resolv_tmpl_source)
# {"server": {"tag": <str>}}
#
# Hosts entries are similar:
-# {"host": {"tag": <str>, "address": <str>}}
+# {"host": {"tag": <str>, "address": <str>, "aliases": <str list>}}
#
# The tag is either "static" or "dhcp-<intf>"
# It's used to distinguish entries created