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

Suppress error in S6 systems other than Artix #23

Merged
merged 1 commit into from
May 24, 2024

Conversation

aptalca
Copy link
Contributor

@aptalca aptalca commented Jun 28, 2023

If the command s6-rc -a list is run on a system utilizing S6 supervisor during init, it fails with error s6-rc: fatal: unable to take locks: Resource busy because the s6-rc database is locked during init. If it is run post-init, it returns a list of active services successfully. The change was introduced in PR #12 to add support for Artix linux, but it creates an issue for non-Artix S6 users who rely on openresolv during init steps.

This proposed change suppresses the error and should not have any impact on the function. If resolvectl is called during init, the grep in the if statement will return false without error and RESTARTCMD won't be set (as expected) as there shouldn't be any Artix service to restart anyway.

If the command `s6-rc -a list` is run on a system utilizing S6 supervisor during init, it fails with error `s6-rc: fatal: unable to take locks: Resource busy` because the s6-rc database is locked during init. If it is run post-init, it returns a list of active services successfully. The change was introduced in PR NetworkConfiguration#12 to add support for Artix linux, but it creates an issue for non-Artix S6 users who rely on openresolv during init steps.

This proposed change suppresses the error and should not have any impact on the function. If resolvectl is called during init, the grep in the if statement will return false without error and RESTARTCMD won't be set (as expected) as there shouldn't be any services to restart anyway.
@aptalca
Copy link
Contributor Author

aptalca commented Jun 28, 2023

pinging @sinanmohd as they were the author of the original PR #12

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.

None yet

2 participants