Suppress error in S6 systems other than Artix #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If the command
s6-rc -a list
is run on a system utilizing S6 supervisor during init, it fails with errors6-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.