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

Detect usage of ::File.open('/proc/1/comm').gets.chomp == 'systemd' #528

Closed
1 of 6 tasks
tas50 opened this issue Feb 19, 2020 · 0 comments
Closed
1 of 6 tasks

Detect usage of ::File.open('/proc/1/comm').gets.chomp == 'systemd' #528

tas50 opened this issue Feb 19, 2020 · 0 comments
Labels
New Cop Proposal A proposal for a new Cookstyle cop Triage: Confirmed Indicates and issue has been confirmed as described. Type: Chore non-critical maintenance of a project.

Comments

@tas50
Copy link
Contributor

tas50 commented Feb 19, 2020

What category of cop is this?:

Please try to select as few as possible.

  • ChefDeprecations - A cop that alerts on a deprecation in the Chef Infra Client
  • ChefCorrectness - A cop that alerts when incorrect coding behavior is being used
  • ChefSharing - A cop that alerts to missing functionality necessary for sharing cookbooks with others
  • ChefStyle - A cop that alerts to a style best practice
  • ChefModernize - A cop that alerts when a cookbook can be simplified or modernized with new functionality
  • ChefEffortless - A cop that alerts on code that must be resolved to move to the Effortless pattern

Describe the new cop:

We should get folks to use the simpler ohai attribute to check if a system is running systemd

What it would trigger on:

::File.open('/proc/1/comm').gets.chomp == 'systemd'

What it would autocorrect to if applicable

node['init_package'] == 'systemd'
@tas50 tas50 added Status: Untriaged An issue that has yet to be triaged. New Cop Proposal A proposal for a new Cookstyle cop labels Feb 19, 2020
@tyler-ball tyler-ball added Aspect: UX How users feel interacting with the project, focusing on function, ease-of-use and accessibility. Triage: Confirmed Indicates and issue has been confirmed as described. Type: Chore non-critical maintenance of a project. and removed Status: Untriaged An issue that has yet to be triaged. labels Feb 19, 2020
@tas50 tas50 removed the Aspect: UX How users feel interacting with the project, focusing on function, ease-of-use and accessibility. label Feb 22, 2020
@tas50 tas50 closed this as completed Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Cop Proposal A proposal for a new Cookstyle cop Triage: Confirmed Indicates and issue has been confirmed as described. Type: Chore non-critical maintenance of a project.
Projects
None yet
Development

No branches or pull requests

2 participants