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

Syntax error on run_audit.sh #58

Closed
cpeetersburg opened this issue Apr 18, 2024 · 3 comments
Closed

Syntax error on run_audit.sh #58

cpeetersburg opened this issue Apr 18, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@cpeetersburg
Copy link
Contributor

Describe the Issue
When running run_audit.sh, you get the following error:

tr: missing operand after ‘[:lower:]’
Two strings must be given when translating.
Try 'tr --help' for more information.

Expected Behavior
This error shouldn't be thrown. This is clearly a syntax error in the script.

Actual Behavior
You get a syntax error

Control(s) Affected

  • run_audit.sh

Environment (please complete the following information):

  • goss version: 0.4.2
  • OS version: openSUSE Tumbleweed on WSL
  • Additional Details:

Additional Notes
Testing the code on my WSL sandbox before launching it in the actual environment

Possible Solution
On line 86 the following possible amendments can be made:

  • os_vendor="$(hostnamectl | grep Oper | cut -d: -f2 | awk '{print $1}' | tr '[:upper:]' '[:lower:]')"
  • os_vendor="$(hostnamectl | grep Oper | cut -d: -f2 | awk '{print tolower($1)}')"
@cpeetersburg cpeetersburg added the bug Something isn't working label Apr 18, 2024
cpeetersburg pushed a commit to cpeetersburg/RHEL8-CIS-Audit that referenced this issue Apr 18, 2024
cpeetersburg added a commit to cpeetersburg/RHEL8-CIS-Audit that referenced this issue Apr 18, 2024
Signed-off-by: Christopher Peeters <cp@linux.com>
@uk-bolly uk-bolly self-assigned this Apr 18, 2024
@uk-bolly
Copy link
Member

hi @cpeetersburg

Thank you so much for the feedback and subsequent PR. This is indeed a great catch. I have feedback on the PR, very happy to take it but unfortunately it is not GPG signed. If you are able to get it signed will merge asap.

Many thanks once again

uk-bolly

uk-bolly added a commit that referenced this issue Apr 18, 2024
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
@uk-bolly uk-bolly mentioned this issue Apr 18, 2024
uk-bolly added a commit that referenced this issue Apr 18, 2024
* Added clause for issue #56

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>

* updated after checks for #55

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>

* Updated inline with #58

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>

* updated

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>

---------

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
cpeetersburg added a commit to cpeetersburg/RHEL8-CIS-Audit that referenced this issue Apr 19, 2024
Signed-off-by: Christopher Peeters <cp@linux.com>
cpeetersburg added a commit to cpeetersburg/RHEL8-CIS-Audit that referenced this issue Apr 19, 2024
Signed-off-by: Christopher Peeters <cp@linux.com>
@cpeetersburg
Copy link
Contributor Author

Sorry for not signing. Should be okay now.

uk-bolly pushed a commit that referenced this issue Apr 19, 2024
Signed-off-by: Christopher Peeters <cp@linux.com>
@uk-bolly
Copy link
Member

hi @cpeetersburg

Thank you again for raising this issue and PRs, I believe this is now all resolved and merged, i will therefore close this issue. Feel free to reopen if this is not the case.

many thanks

uk-bolly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants