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

Add errors and warnings when network interface does not exist #1652

Merged
merged 1 commit into from Nov 25, 2021

Conversation

pvalena
Copy link
Contributor

@pvalena pvalena commented Nov 23, 2021

End with error, or show a warning when nonexistent device is specified for network setup like ip=10.12.8.12::10.12.255.254:255.255.0.0:xk12:eth0:off.

Changes

I've added the error only for write-ifcfg.sh, as I think no such setup should be written. For the rest I added only warnings, as I'm not sure $dev is not set to something else, or it can be a non-critical error.

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

Fixes #1712424

Additional

I'm new to this - this is my first issue, so I'm not entirely sure how to test this. The test suite does not work for me, locally, but I'll try to create a reproducer.

@github-actions github-actions bot added ifcfg Issues related to the ifcfg module modules Issue tracker for all modules network-legacy Issues related to the network-legacy module labels Nov 23, 2021
Copy link
Collaborator

@johannbg johannbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change your commit message
from
Add errors and warnings when network interface does not exist
to
fix(network): add errors and warnings when network interface does not exist

can you also run shfmt -s -w modules.d/35network-legacy/ifup.sh to fix the formatting errors.

… exist

End with error, or show a warning when nonexistent device is specified for network setup like
`ip=10.12.8.12::10.12.255.254:255.255.0.0:xk12:eth0:off`.

I've added the error only for `write-ifcfg.sh`, as I think no such setup should be written.

Resolves: #1712424
@pvalena
Copy link
Contributor Author

pvalena commented Nov 24, 2021

Can you change your commit message from Add errors and warnings when network interface does not exist to fix(network): add errors and warnings when network interface does not exist

can you also run shfmt -s -w modules.d/35network-legacy/ifup.sh to fix the formatting errors.

Done.

@johannbg johannbg self-requested a review November 24, 2021 20:57
@johannbg johannbg enabled auto-merge (rebase) November 24, 2021 20:58
@johannbg johannbg merged commit 7938935 into dracutdevs:master Nov 25, 2021
@pvalena
Copy link
Contributor Author

pvalena commented Nov 29, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ifcfg Issues related to the ifcfg module modules Issue tracker for all modules network-legacy Issues related to the network-legacy module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants