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

fix(platform): fix selinux validation #2220

Merged
merged 1 commit into from
Jan 4, 2023

Conversation

leoryu
Copy link
Contributor

@leoryu leoryu commented Jan 4, 2023

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind api-change
/kind bug
/kind cleanup
/kind deprecation
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@leoryu leoryu requested a review from choujimmy as a code owner January 4, 2023 06:28
stdout, _, exit, err := s.Exec("selinuxenabled")
if err != nil || exit != 0 {
// https://www.thegeekdiary.com/how-to-check-whether-selinux-is-enabled-or-disabled/
stdout, _, _, err := s.Exec("selinuxenabled; echo $?;")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can use the the third return value for Exec function rather than run "echo $?" manually

@leoryu leoryu merged commit 8151aa4 into tkestack:master Jan 4, 2023
@leoryu leoryu deleted the fix-selinux-validation branch January 4, 2023 10:33
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