Skip to content

Remove resolv.conf after purging resolvconf#23

Open
oonska wants to merge 1 commit intosaltstack-formulas:masterfrom
oonska:remove-symlink
Open

Remove resolv.conf after purging resolvconf#23
oonska wants to merge 1 commit intosaltstack-formulas:masterfrom
oonska:remove-symlink

Conversation

@oonska
Copy link
Copy Markdown

@oonska oonska commented Aug 16, 2017

If there is an existing symlink to resolv.conf then the file.managed
state will fail. Here we resolve that by destroying the resolv.conf
file if we remove resolvconf.

If there is an existing symlink to resolv.conf then the file.managed
state will fail. Here we resolve that by destroying the resolv.conf
file if we remove resolvconf.
@aboe76
Copy link
Copy Markdown
Contributor

aboe76 commented Aug 16, 2017

@oonska I understand the issue, but removing the symlink won't it render the system unusable?

@0xf10e
Copy link
Copy Markdown

0xf10e commented Aug 17, 2017

Not if you replace it with a proper resolv.conf after removing the symlink but at a quick glance I can't see the PR taking care of that.

@oonska
Copy link
Copy Markdown
Author

oonska commented Aug 17, 2017

The next state 'resolv-file' will create the /etc/resolv.conf file after we remove the symlink in 'remove-symlink'.
The file removal and replacement only happens when we uninstall resolvconf.
As far as name resolution goes this will work provided that resolvconf is the only utility managing the resolv.conf file.

@aabouzaid
Copy link
Copy Markdown
Contributor

I think a better way to do that is just adding:
- follow_symlinks: False

So no need to remove the symlink then create it, but it will be overwritten.
That what I did in resolver.ng formula to deal with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants