Bug #2291
Fix operatingsystemrelease for CentOS < 5
| Status: | Closed | Start date: | 05/22/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | 1.5.5 | |||
| Keywords: | Affected Facter version: | |||
| Branch: | ||||
| Votes: | 0 |
Description
From irc:
On older CentOS releases, a sed command is used to parse the release number from /etc/redhat-release. However, the command lacked the proper amount of backslashes to escape the parenthesis.
Also
The previous check for /5/ matched releases like 4.5, which is not the intent. The previous check was introduced in 095eb15e, and changed the pattern from /5/. Using /5/ to match when the release begins with 5 seems saner.
History
Updated by Paul Nasrat about 3 years ago
- Target version set to 1.5.5
Updated by Paul Nasrat about 3 years ago
- Status changed from Accepted to Ready For Checkin
Github – git://github.com/pnasrat/facter.git tickets/master/2291
Before Patch 1:
[pnasrat@localhost facter]$ ruby -Ilib bin/facter operatingsystemrelease 4.7 (Final)
After [pnasrat@localhost facter]$ ruby -Ilib bin/facter operatingsystemrelease 4.7 Edited /etc/redhat-release to be 4.5 (Final)
[pnasrat@localhost facter]$ rpm -q centos-release centos-release-4-7 [pnasrat@localhost facter]$ ruby -Ilib bin/facter operatingsystemrelease 4.7
Switched to branch “tickets/master/2291” [pnasrat@localhost facter]$ ruby -Ilib bin/facter operatingsystemrelease 4.5
Updated by James Turnbull about 3 years ago
- Status changed from Ready For Checkin to Closed
Pushed in commit:b533e78689951cdf5989cb1014680958c903ab9e in branch master.