summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote branch 'stschulte/feature/master/5040' into nextPaul Berry2010-11-092-3/+11
|\ | | | | | | | | | | Manually resolved conflicts: lib/facter/virtual.rb spec/unit/virtual.rb
| * (#5040) fact virtual should detect hpvmStefan Schulte2010-11-032-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With HP-UX you can build virtual machines that are often refered to as HP-VMs. This patch detecs HP-VMs by introducing a new function hpvm? that will check the output of /usr/bin/getconf MACHINE_MODEL. This should not depend on any tools that might be not installed. If inside a HP-VM the command will say something like ia64 hp server Integrity Virtual Machine while on real hardware the output could be ia64 hp server rx660 so searching for "Virtual Machine" should work. Currently it only works if the guest is also running HP-UX. (I guess this is the most common usecase).
* | Merge remote branch 'stschulte/ticket/master/5016' into nextPaul Berry2010-11-091-1/+1
|\ \ | | | | | | | | | | | | | | | Manually resolved conflicts: lib/facter/virtual.rb spec/unit/virtual.rb
| * | (#5016) is_virtual should be true on solaris zonesStefan Schulte2010-11-031-1/+1
| |/ | | | | | | | | | | | | While the fact virtual recognised solaris zones before, the is_virtual fact did not. With this patch applied is_virtual returns true on (non-global) zones
| |
| \
*-. | Merge remote branches 'pnasrat/tickets/master/4889' and ↵Rein Henrichs2010-10-181-2/+2
|\ \| | | | | | | | | | 'pnasrat/tickets/master/4956' into next
| * | Issue #4889 Fact values should all be stringsPaul Nasrat2010-10-071-2/+2
| |/ | | | | | | Fix is_virtual fact to return strings rather than bools.
* | maint: Fix merge errorRein Henrichs2010-10-071-2/+0
| |
* | Merge branch 'ticket/master/4552' into nextRein Henrichs2010-10-053-1/+40
|\ \ | | | | | | | | | | | | | | | Conflicts: bin/facter lib/facter/application.rb
| * | [#4552] Updating --timing to report in milliseconds instead of secondsRein Henrichs2010-10-042-12/+5
| | |
| * | [#4552] Apply patch from Dean WilsonRein Henrichs2010-10-043-1/+41
| | |
| * | Better fix for Bug 4569: Uptime Fact is incorrect on WindowsWilliam Van Hevelingen2010-10-041-3/+6
| | | | | | | | | | | | | | | | | | Patch removes reliance on clock ticks and instead queries for last boot time and subtracts from Time.now Signed-off-by: William Van Hevelingen <wvan13@gmail.com>
| * | [#4289] operatingsystemrelease fact for oel, ovsRein Henrichs2010-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When Facter returns operatingsystem as "oel" or "ovs", the operatingsystemrelease fact does not catch these properly, causing an error. Specs added to catch failure and case statement updated to catch "oel" and "ovs" as well as "OEL" and "OVS"
| * | Fix for bug #4569William Van Hevelingen2010-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | * getTickCount.call() is not an epoch time value so compute_uptime is not necessary Signed-off-by: William Van Hevelingen <wvan13@gmail.com>
| * | (#4558) Fail with message on --help errorsRein Henrichs2010-10-041-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | If rdoc/usage fails to load, tell the user why and fail. If another failure happens, report the error message and fail. Paired With: Jacob Helwig Signed-off-by: Rein Henrichs <rein@puppetlabs.com>
| * | [#4558] Refactor facter binary using optparseRein Henrichs2010-10-041-0/+99
| | | | | | | | | | | | | | | | | | | | | Simplify the binary by moving all application specific code into a new Facter::Application module. This module is then refactored to use OptionParser and to simplify invocation logic, while maintaining existing behavior.
| | |
| \ \
*-. \ \ Merge branches 'feature/master/4567' and 'feature/master/4563' into nextRein Henrichs2010-10-051-0/+104
|\ \ \ \ | | |/ / | |/| |
| | * | [#4563] Add a --trace option to the binaryRein Henrichs2010-10-041-2/+7
| | | |
| | * | [#4558] Refactor facter binary using optparseRein Henrichs2010-10-041-0/+99
| |/ / | | | | | | | | | | | | | | | | | | Simplify the binary by moving all application specific code into a new Facter::Application module. This module is then refactored to use OptionParser and to simplify invocation logic, while maintaining existing behavior.
* | | Merge branch 'master' into nextRein Henrichs2010-10-052-6/+3
|\ \ \ | | |/ | |/|
| * | [#4583] Refactor uptime to use Resolution.execRein Henrichs2010-08-241-3/+3
| | | | | | | | | | | | Resolution.exec used to ensure that any shell errors are suppressed.
| * | [#4594] Reintroduce fix for #1291 from original patchRein Henrichs2010-08-241-3/+0
| | | | | | | | | | | | | | | The reverted patch contains a fix for #1291 that is desired. This commit reintroduces that change.
* | | Merge branch 'bug/master/4594' into nextRein Henrichs2010-08-243-12/+7
|\| |
| * | [#4594] Revert "fixes #2573, #2085, #1291..."Rein Henrichs2010-08-233-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | This is a revert of ticket #2573, which introduces a reverse DNS lookup to the resolution of fqdn. As per #3898, this does not corrently return the fqdn on all systems. This reverts commit dca615c98b864d75e2ac5899d98d04a2bd979eba.
* | | Merge branch 'master' into nextRein Henrichs2010-08-201-2/+2
|\| |
| * | Merge branch 'bug/master/4289'Rein Henrichs2010-08-201-2/+2
| |\ \
| | * | [#4289] operatingsystemrelease fact for oel, ovsRein Henrichs2010-08-181-2/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | When Facter returns operatingsystem as "oel" or "ovs", the operatingsystemrelease fact does not catch these properly, causing an error. Specs added to catch failure and case statement updated to catch "oel" and "ovs" as well as "OEL" and "OVS"
* | | Merge branch 'master' into nextRein Henrichs2010-08-191-3/+6
|\| |
| * | Better fix for Bug 4569: Uptime Fact is incorrect on WindowsWilliam Van Hevelingen2010-08-191-3/+6
| | | | | | | | | | | | | | | | | | Patch removes reliance on clock ticks and instead queries for last boot time and subtracts from Time.now Signed-off-by: William Van Hevelingen <wvan13@gmail.com>
| * | Fix for bug #4569William Van Hevelingen2010-08-181-1/+1
| |/ | | | | | | | | | | | | * getTickCount.call() is not an epoch time value so compute_uptime is not necessary Signed-off-by: William Van Hevelingen <wvan13@gmail.com>
* | Merge branch 'ticket/master/3703-macaddress-on-mac' into nextRein Henrichs2010-08-182-13/+31
|\ \
| * | [#3703] Fix macaddress fact for DarwinRein Henrichs2010-08-112-13/+31
| | | | | | | | | | | | * With tests for 9.8.0, 10.3.0 and 10.6.4
* | | Merge branch 'ticket/master/2865-virtual-fact-reporting' into nextRein Henrichs2010-08-181-1/+1
|\ \ \ | |_|/ |/| |
| * | [#2865] Fix reporting of virtual factsRein Henrichs2010-08-181-1/+1
| |/ | | | | | | | | | | | | | | | | Regexp tested the s_context or VxID field if /proc/self/status and returned false for 0 and true for any other number. 0 indicates a host, which is still virtual. Fix changes regexp to correctly report hosts as virtual. Tested against vserver 2.1 and 2.3.
* / Incremented version to 1.5.8James Turnbull2010-08-181-1/+1
|/
* [#4156] Applying patch by KaiRein Henrichs2010-08-061-1/+1
| | | | | | | | | | Patch from the ticket[1] checks for /proc/vz instead of /proc/vz/vzinfo. NOTE that this causes a spec failure since the spec was not changed to match. [1] http://projects.reductivelabs.com/issues/4156 Signed-off-by: Rein Henrichs <rein@puppetlabs.com>
* Merge branch 'ticket/master/4441-windows-ipaddress'Rein Henrichs2010-08-061-2/+4
|\
| * Properly wrapped the windows ipaddress fact in a setcode block.Nick Lewis2010-07-211-2/+4
| |
* | Merge remote branch 'kubicek/ticket/master/4352'Rein Henrichs2010-08-062-5/+13
|\ \
| * | Fix #4352 - Support for detecting KVM virtuals on FreeBSDJiri Kubicek2010-07-261-4/+5
| | | | | | | | | | | | | | | | | | There was no support for detecting FreeBSD running in KVM as a virtual in facter. This patch detects KVM by getting "hw.model" kernel state via sysctl. Jails running in KVM are also correctly detected as "jail" not "kvm". Signed-off-by: Jiri Kubicek <jiri.kubicek@kraxnet.cz>
| * | Fix #4352 - Support for detecting virtuals (jails) on FreeBSDJiri Kubicek2010-07-262-1/+8
| | | | | | | | | | | | | | | | | | There was no support for detecting FreeBSD jails as a virtual in facter. This patch detects jail by getting "security.jail.jailed" kernel state via sysctl. Signed-off-by: Jiri Kubicek <jiri.kubicek@kraxnet.cz>
| | |
| \ \
| \ \
| \ \
*---. | | Merge branches 'ticket/master/2330-uptime', 'ticket/master/4062-meego' and ↵Rein Henrichs2010-08-067-38/+88
|\ \ \| | | | | | | | | | | | | | | | | 'ticket/master/4453-rakefile'
| | * | | [#4062] Implement operating system facts for MeeGoRein Henrichs2010-08-032-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements operatingsystem and operatingsystemrelease for MeeGo From Rohan McGovern's patch: MeeGo ( http://meego.com/ ) uses an /etc/meego-release file similar to the files found on many Linux distros. Currently, MeeGo falls back on “Linux” as the operatingsystem fact. It’d be useful to have a proper value. Attached patch implements it. Signed-off-by: Rein Henrichs <rein@puppetlabs.com>
| * | | | [#2330] Update uptime calculation to use /bin/catRein Henrichs2010-08-051-7/+6
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Per #4466, Ruby has trouble reading files in /proc [1]. The alternative is to use `bin/cat`. * Also refactored methods to explicitly redirect standard error to /dev/null for *nix and BSD system calls. [1] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/155745
| * / / [#2330] Uptime should not make redundant system callsRein Henrichs2010-08-035-37/+84
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite of uptime facts and supporting utility methods. Works on unix, BSD, windows. No longer makes redundant system calls. Uses Facter::Util::Uptime utility methods: * Implemented uptime_seconds_unix using /proc/uptime or who -b on unix, sysctl on BSD. Added unit tests for the behaviors of get_uptime_seconds_unix: read from proc/uptime, read uptime from "sysctl -b kern.boottime", read uptime from "who -b", and return nil if nothing else works. * Implemented uptime_seconds_win using the Win32 API. Facts implemented: * uptime_{seconds,hours,days} Returns the respective integer value. * uptime Returns human readable uptime statistic that preserves original behavior. Examples: 3 days 1 day 5:08 hours 0:35 hours
* / / Facter::Manufacturer - sunos test + simplified regexMarc Fournier2010-08-041-1/+1
|/ / | | | | | | | | | | | | | | | | The 2nd regex (with the 0x\d+) got removed because it appears to never be used, even on SunOS, for which it has been introduced (99833a1b / #1793). The 3dn regex is changed to clearly confine the value between mandatory newlines/whitespaces.
* / Fixed #3929 - Added user confine to AIX memory factsJames Turnbull2010-06-181-7/+7
|/
* Adding HP-UX support to Facter's IP factsJames Turnbull2010-06-151-3/+15
| | | | Includes Rspec tests
* Fixed #3393 - Updates to Facter for MS WindowsDavid Schmitt2010-06-154-39/+72
| | | | | | | | | | This patch is originally by Daniel Berger <djberg96@gmail.com>, I changed using Facter.value instead of repeatedly testing Config['host_os'], removed Resolution::which, and fixed the specs. Thanks to Paul Nasrat for helping with cross-platform debugging. Signed-off-by: David Schmitt <david@dasz.at>
* Fixed #3403 - Added fact to query vlans; added spec testJonas Genannt2010-06-132-0/+32
|
* Fixed #2355 read hang on /proc/xen/capabilties on RHEL 4.7Bernhard Furtmueller2010-05-271-2/+2
|