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

systemd: correct path for awk (to /usr/bin/awk) #8513

Closed
wants to merge 1 commit into from

Conversation

cwedgwood
Copy link
Contributor

Motivation and Context

Description

I noticed the systemd import scripts having problems and logging errors trying to access /bin/awk.

The spec requirement is /usr/bin/awk and the various systems I examined (debian, ubuntu, centos, alpine) all have /usr/bin/awk as opposed to /bin/awk.

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

The systemd scripts use awk bit /bin/awk which doesn't exist on most
systems which use /usr/bin/awk (checked on Debian, Ubuntu, CentOS,
Alpine).

Signed-off-by: Chris Wedgwood <cw@f00f.org>
@c0d3z3r0
Copy link
Contributor

c0d3z3r0 commented Mar 18, 2019

You are making the same mistake as the original author did. Do not hardcode binary paths in systemd units for standard directories. Using just "awk" is safe because systemd only looks in standard directories (sbin, bin, usr/bin...).
Besides that, I already submitted a PR for this, yesterday ;-) #8510

@cwedgwood
Copy link
Contributor Author

@c0d3z3r0 thanks, I didn't see your PR. Closing.

@cwedgwood cwedgwood closed this Mar 18, 2019
@codecov
Copy link

codecov bot commented Mar 19, 2019

Codecov Report

Merging #8513 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8513      +/-   ##
==========================================
- Coverage   78.55%   78.54%   -0.02%     
==========================================
  Files         380      380              
  Lines      116324   116324              
==========================================
- Hits        91375    91362      -13     
- Misses      24949    24962      +13
Flag Coverage Δ
#kernel 79.03% <ø> (-0.04%) ⬇️
#user 67.16% <ø> (+0.23%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca6c7a9...7b6c24b. Read the comment docs.

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.

2 participants