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

Avoid warning on grep 3.8 in hwclock #549

Merged
merged 1 commit into from
Sep 7, 2022
Merged

Conversation

particleflux
Copy link
Contributor

Starting with grep version 3.8, the hwclock init script logs warnings about stray backslashes:

hwclock | * Setting system clock using the hardware clock [UTC] ...
hwclock |grep: warning: stray \ before -
hwclock |grep: warning: stray \ before -

This is caused by the check for existence of the --noadjfile argument in function get_noadjfile().

Replacing the affected logic with an explicit argument denoting the pattern as such resolves the issue.

Fixes #548

Starting with grep version 3.8, the hwclock init script logs warnings
about stray backslashes:

> hwclock | * Setting system clock using the hardware clock [UTC] ...
> hwclock |grep: warning: stray \ before -
> hwclock |grep: warning: stray \ before -

This is caused by the check for existence of the `--noadjfile` argument
in function `get_noadjfile()`.

Replacing the affected logic with an explicit argument denoting the
pattern as such resolves the issue.

Fixes OpenRC#548
@vapier vapier merged commit 9380347 into OpenRC:master Sep 7, 2022
@vapier
Copy link
Member

vapier commented Sep 7, 2022

thx bud

@particleflux particleflux deleted the issue-548 branch September 7, 2022 17:48
@safiire
Copy link

safiire commented Sep 11, 2022

Thanks this was bugging me :)

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.

hwclock init script logging grep warning
3 participants