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

Modify for Amazon Linux. #85

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@matsumana
Contributor

matsumana commented May 4, 2013

Can't run at Amazon Linux.
I've modified check_os.
Can run as Serverspec::Helper::DetectOS

@mizzy

This comment has been minimized.

Show comment
Hide comment
@mizzy

mizzy May 4, 2013

Owner

It seems that /etc/image-id is also added to any other OS by Eucalyptus.
https://github.com/eucalyptus/Eucalyptus-Scripts/blob/master/EMI-IDs

So it is not good to detect the type of OS by this file.

puppetlabs/facter detects Amazon Linux by checking /etc/system-release.
https://github.com/puppetlabs/facter/blob/master/lib/facter/operatingsystem.rb#L107

So this will be better:

+        elsif run_command('ls /etc/system-release')[:exit_status] == 0
+          'RedHat' # Amazon Linux
Owner

mizzy commented May 4, 2013

It seems that /etc/image-id is also added to any other OS by Eucalyptus.
https://github.com/eucalyptus/Eucalyptus-Scripts/blob/master/EMI-IDs

So it is not good to detect the type of OS by this file.

puppetlabs/facter detects Amazon Linux by checking /etc/system-release.
https://github.com/puppetlabs/facter/blob/master/lib/facter/operatingsystem.rb#L107

So this will be better:

+        elsif run_command('ls /etc/system-release')[:exit_status] == 0
+          'RedHat' # Amazon Linux
Re-Modify for Amazon Linux.
'/etc/image-id' is not only for Amazon Linux.
@matsumana

This comment has been minimized.

Show comment
Hide comment
@matsumana

matsumana May 4, 2013

Contributor

Thank you for your information.
Has re-modified.

Contributor

matsumana commented May 4, 2013

Thank you for your information.
Has re-modified.

@mizzy

This comment has been minimized.

Show comment
Hide comment
@mizzy

mizzy May 4, 2013

Owner

Thanks.I've cherry-picked only ed8691d .

Owner

mizzy commented May 4, 2013

Thanks.I've cherry-picked only ed8691d .

@mizzy mizzy closed this May 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment