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

upstart_service: fallback to config files if show-config is not available #419

Merged
merged 3 commits into from
Feb 5, 2016

Conversation

srenatus
Copy link
Contributor

@srenatus srenatus commented Feb 5, 2016

Fixes #417.

@srenatus srenatus added the Type: Bug Feature not working as expected label Feb 5, 2016
enabled = !config.stdout[/^\s*start on/].nil?
cmd = inspec.command("#{service_ctl} show-config #{service_name}")

# if initctl doesn't know `show-config`, try config file as fallback
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not 100% sure, but doesn't show-config also returns a non-zero exit code, when the service is not available. Maybe its better to check for the specific version?

before this regexp change, a service called "running" (hello integration
tests) would always be "running" ;)
@chris-rock
Copy link
Contributor

Thanks @srenatus for this improvement

chris-rock added a commit that referenced this pull request Feb 5, 2016
upstart_service: fallback to config files if `show-config` is not available
@chris-rock chris-rock merged commit 5e1c9e2 into master Feb 5, 2016
@chris-rock chris-rock deleted the sr/fix-upstart-pre-1.3 branch February 5, 2016 13:06
@chris-rock chris-rock added this to the 0.9.12 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Feature not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants