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

Update the lvlab hosts --append command to verify before appending #28

Open
memblin opened this issue Aug 18, 2024 · 0 comments
Open

Update the lvlab hosts --append command to verify before appending #28

memblin opened this issue Aug 18, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@memblin
Copy link
Owner

memblin commented Aug 18, 2024

As an lvlab user the lvlab hosts --append command can sometimes add duplicate content to the /etc/hosts file. We should update the feature to do some validation before appending.

Potential validations:

  • Does this IP already exist in /etc/hosts
  • Does this hostname already exists in /etc/hosts
  • Does this fqdn already exist in the /etc/hosts

If any of the items for a machine already exists, skip that entry and output that it was skipped and why.
Add non-conflicting entries as appropriate.

AC

  • The lvlab hosts --append command no longer adds duplicate values to the /etc/hosts file
  • The output from a conflicting entry is easy to understand
  • When writing machine /etc/hosts the local machine name is excluded allowing 127.0.0.1 and ::1 to work as expected
@memblin memblin converted this from a draft issue Aug 18, 2024
@memblin memblin added the enhancement New feature or request label Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Ready
Development

No branches or pull requests

1 participant