Commit cd6a4696 authored by Thomas Haller's avatar Thomas Haller
Browse files

dns: rename "rc-manager=none" to "symlink"

We already have "rc-manager=file", rename "rc-manager=none" to "symlink"
because that better describes what it is actually doing. Of course, the
old name is still accepted.
parent c17b4ba6
......@@ -313,7 +313,7 @@ no-auto-default=*
management mode. The default value depends on how NetworkManager
was built. Regardless of this setting, NetworkManager will
always write resolv.conf to its runtime state directory.</para>
<para><literal>none</literal>: NetworkManager will symlink
<para><literal>symlink</literal>: NetworkManager will symlink
<filename>/etc/resolv.conf</filename> to its private
resolv.conf file in the runtime state directory.</para>
<para><literal>file</literal>: NetworkManager will write
......@@ -322,6 +322,8 @@ no-auto-default=*
resolvconf to update the DNS configuration.</para>
<para><literal>netconfig</literal>: NetworkManager will run
netconfig to update the DNS configuration.</para>
<para><literal>none</literal>: deprecated alias for
<literal>symlink</literal>.</para>
</listitem>
</varlistentry>
......
......@@ -164,7 +164,7 @@ typedef struct {
NM_UTILS_LOOKUP_STR_DEFINE_STATIC (_rc_manager_to_string, NMDnsManagerResolvConfManager,
NM_UTILS_LOOKUP_DEFAULT_WARN (NULL),
NM_UTILS_LOOKUP_STR_ITEM (NM_DNS_MANAGER_RESOLV_CONF_MAN_NONE, "none"),
NM_UTILS_LOOKUP_STR_ITEM (NM_DNS_MANAGER_RESOLV_CONF_MAN_SYMLINK, "symlink"),
NM_UTILS_LOOKUP_STR_ITEM (NM_DNS_MANAGER_RESOLV_CONF_MAN_FILE, "file"),
NM_UTILS_LOOKUP_STR_ITEM (NM_DNS_MANAGER_RESOLV_CONF_MAN_RESOLVCONF, "resolvconf"),
NM_UTILS_LOOKUP_STR_ITEM (NM_DNS_MANAGER_RESOLV_CONF_MAN_NETCONFIG, "netconfig"),
......@@ -673,7 +673,7 @@ update_resolv_conf (NMDnsManager *self,
return write_file_result;
}
if (rc_manager != NM_DNS_MANAGER_RESOLV_CONF_MAN_NONE) {
if (rc_manager != NM_DNS_MANAGER_RESOLV_CONF_MAN_SYMLINK) {
_LOGT ("update-resolv-conf: write internal file %s succeeded", MY_RESOLV_CONF);
return SR_SUCCESS;
}
......@@ -1068,7 +1068,7 @@ update_dns (NMDnsManager *self,
if (update) {
switch (priv->rc_manager) {
case NM_DNS_MANAGER_RESOLV_CONF_MAN_NONE:
case NM_DNS_MANAGER_RESOLV_CONF_MAN_SYMLINK:
case NM_DNS_MANAGER_RESOLV_CONF_MAN_FILE:
result = update_resolv_conf (self, searches, nameservers, options, error, priv->rc_manager);
resolv_conf_updated = TRUE;
......@@ -1087,7 +1087,7 @@ update_dns (NMDnsManager *self,
if (result == SR_NOTFOUND) {
_LOGD ("update-dns: program not available, writing to resolv.conf");
g_clear_error (error);
result = update_resolv_conf (self, searches, nameservers, options, error, NM_DNS_MANAGER_RESOLV_CONF_MAN_NONE);
result = update_resolv_conf (self, searches, nameservers, options, error, NM_DNS_MANAGER_RESOLV_CONF_MAN_SYMLINK);
resolv_conf_updated = TRUE;
}
}
......@@ -1512,8 +1512,8 @@ init_resolv_conf_manager (NMDnsManager *self)
const char *man;
man = nm_config_data_get_rc_manager (nm_config_get_data (priv->config));
if (!g_strcmp0 (man, "none"))
priv->rc_manager = NM_DNS_MANAGER_RESOLV_CONF_MAN_NONE;
if (NM_IN_STRSET (man, "symlink", "none"))
priv->rc_manager = NM_DNS_MANAGER_RESOLV_CONF_MAN_SYMLINK;
else if (nm_streq0 (man, "file"))
priv->rc_manager = NM_DNS_MANAGER_RESOLV_CONF_MAN_FILE;
else if (!g_strcmp0 (man, "resolvconf"))
......@@ -1526,7 +1526,7 @@ init_resolv_conf_manager (NMDnsManager *self)
#elif defined(NETCONFIG_SELECTED)
priv->rc_manager = NM_DNS_MANAGER_RESOLV_CONF_MAN_NETCONFIG;
#else
priv->rc_manager = NM_DNS_MANAGER_RESOLV_CONF_MAN_NONE;
priv->rc_manager = NM_DNS_MANAGER_RESOLV_CONF_MAN_SYMLINK;
#endif
if (man)
_LOGW ("unknown resolv.conf manager '%s'", man);
......
......@@ -110,10 +110,10 @@ typedef enum {
* @_NM_DNS_MANAGER_RESOLV_CONF_MAN_INTERNAL_ONLY: dummy-manager
* to not write resolv.conf at all, only the internal file in
* NM's run state directory.
* @NM_DNS_MANAGER_RESOLV_CONF_MAN_NONE: NM writes resolv.conf
* @NM_DNS_MANAGER_RESOLV_CONF_MAN_SYMLINK: NM writes resolv.conf
* by symlinking it to the run state directory.
* @NM_DNS_MANAGER_RESOLV_CONF_MAN_FILE: Like NONE, but instead of symlinking
* resolv.conf, write it as a file.
* @NM_DNS_MANAGER_RESOLV_CONF_MAN_FILE: Like SYMLINK, but instead of
* symlinking /etc/resolv.conf, write it as a file.
* @NM_DNS_MANAGER_RESOLV_CONF_MAN_RESOLVCONF: NM is managing resolv.conf
through resolvconf
* @NM_DNS_MANAGER_RESOLV_CONF_MAN_NETCONFIG: NM is managing resolv.conf
......@@ -123,7 +123,7 @@ typedef enum {
*/
typedef enum {
_NM_DNS_MANAGER_RESOLV_CONF_MAN_INTERNAL_ONLY,
NM_DNS_MANAGER_RESOLV_CONF_MAN_NONE,
NM_DNS_MANAGER_RESOLV_CONF_MAN_SYMLINK,
NM_DNS_MANAGER_RESOLV_CONF_MAN_FILE,
NM_DNS_MANAGER_RESOLV_CONF_MAN_RESOLVCONF,
NM_DNS_MANAGER_RESOLV_CONF_MAN_NETCONFIG,
......
Markdown is supported
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