Comment 16 for bug 1843634

Revision history for this message
Moustafa Moustafa (momousta) wrote :

The issue is that the content string is reinitialized with the contents of the already existing "resolv.conf" file as following. But the file only contains commented line.

        if existing_dns_path and os.path.isfile(existing_dns_path):
            content = resolv_conf.ResolvConf(util.load_file(existing_dns_path))

So even though there is no name servers nor search domains added to the content, It's still not empty. And the check (not str(content)) will return false. The header will be added to the content and the file will be modified. So netconfig is not touching it.

        if not str(content):
            return None