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

Package PREIN Distribution Check Fails when /etc/issue is non standard. #103

Open
joebeard opened this issue Nov 23, 2016 · 0 comments
Open

Comments

@joebeard
Copy link

Installation of datadog agent fails due to the method of checking for distribution in the pre-install script:

/~https://github.com/DataDog/dd-agent-omnibus/blob/master/package-scripts/datadog-agent/preinst#L7

Which doesn't leave much room for custom /etc/issue files and I would like to respectfully ask this is reviewed to either make it more flexible or more use more OS resources to verify the specific release.

In our instance the /etc/issue file is built by Chef and includes the line:

System Info: rhel amazon 2016.09

Which is built from the following chef template configuration (the template itself has a legal warning followed by system info):

template "/etc/issue" do
  source "issue"
  mode 0644
  variables(
    "platform" => node["platform"],
    "platform_version" => node["platform_version"],
    "platform_family" => node["platform_family"]
  )
end

We use the same base cookbook across multiple distributions.

Unfortunately here the case doesn't match. An alternative file to check on Amazon Linux would be /etc/system-release which contains:

Amazon Linux AMI release 2016.09

A simple fix would be just to add case insensitivity to the grep statement which would fix my use case but that is selfish and suggest checking:

  • lsb_release (if installed)
  • All /etc/*-release files present
  • /etc/issue
  • uname -s
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

No branches or pull requests

1 participant