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

[bugfix] [RHEL/7] Version #2 of service_disabled & service_enabled (unix:file_test based) template for systemd #230

Merged

Conversation

iankko
Copy link

@iankko iankko commented Sep 21, 2014

This patchset updates the original version it to be able to properly handle also cases, when service is masked or enabled-runtime.

For service_disabled template - service is considered to be disabled when:
  * corresponding RPM isn't installed OR,
  * particular service got masked OR,
  * particular service is disabled on boot AND not enabled at runtime.

For testing this template is applied against abrtd service (service_abrtd_disabled check).

For service enabled template - service is considered to be enabled when:
  * corresponding RPM is installed AND,
  * service in question is not masked AND,
  * service in question is enabled on boot time

For testing this template has been applied against iptables service (service_iptables_enabled check).

Tested on RHEL-7 & works as expected (AFAICT).

Please review.

Thank you, Jan.

Jan Lieskovsky added 2 commits September 21, 2014 13:05
…st) template for systemd.

         Service is considered disabled if:
         * corresponding RPM isn't installed OR,
         * particular service got masked OR,
         * particular service is disabled on boot AND not enabled at runtime.

         Also apply that template against abrtd service for testing.
…t) template for systemd.

         Service is considered enabled if:
         * corresponding RPM is installed AND,
         * service in question is not masked AND,
         * service in question is enabled on boot time [*].

         Also apply that template against iptables service for testing.

[*] It's not needed to check if service isn't disabled at runtime, and
    simultaneously enabled on boot time, since this configuration is
    unreachable.
@iankko iankko added bugfix Fixes to reported bugs. RHEL Red Hat Enterprise Linux product related. labels Sep 21, 2014
@iankko iankko added this to the 0.1.19 milestone Sep 21, 2014
@redhatrises
Copy link
Contributor

Can the create_package_installed.py be placed in the shared directory and create_package_installed.py changed to ${SHARED_DIR}/create_package_installed.py in the Makefile?

@shawndwells
Copy link
Member

@redhatrises - yes, that should be done for code cleanup.

i've created a tracking ticket to update the shared variables:
#244

and will go ahead and merge this in order to meet the fri code freeze

shawndwells added a commit that referenced this pull request Sep 25, 2014
[bugfix] [RHEL/7] Version #2 of service_disabled & service_enabled (unix:file_test based) template for systemd
@shawndwells shawndwells merged commit 67f06aa into ComplianceAsCode:master Sep 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes to reported bugs. RHEL Red Hat Enterprise Linux product related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants