Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hostctl removes multi-value domain aliases when adding any domain #87

Open
alcroito opened this issue Feb 7, 2023 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@alcroito
Copy link

alcroito commented Feb 7, 2023

Describe the bug
My ubuntu 22.04 system has the following lines in /etc/hosts by default

127.0.1.1 customhost.mydomain.com customhost
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback

Whenever hostctl is invoked to add any domain, all the aliases after the domain get removed

hostctl add domains awesome my-awesome-ui.project.loc my-awesome-api.project.loc

and the resulting file ends up

127.0.1.1 customhost.mydomain.com
# The following lines are desirable for IPv6 capable hosts
::1 localhost

##################################################################
# Content under this line is handled by hostctl. DO NOT EDIT.
##################################################################

# profile.on awesome
127.0.0.1 my-awesome-ui.project.loc
127.0.0.1 my-awesome-api.project.loc
# end

now every time run I sudo su i get an message sudo: unable to resolve host customhost: Name or service not known because the customhost entry gets removed.

Expected behavior
default profile aliases that are not managed via hostctl should not be removed.

System (please complete the following information):

  • OS: Linux
  • Version: Ubuntu 22.04
@alcroito alcroito added the bug Something isn't working label Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants