| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
| | |
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | | | |
| \ \ | |
| \ \ | |
| \ \ | |
|\ \ \| |
| | | | |
| | | | |
| | | | | |
'ticket/master/4453-rakefile'
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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>
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* 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
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|
|
|
| |
Includes Rspec tests
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Splitting dmi output on the string "/^Handle/" didn't work, and
caused the function to match the wrong key if it was found more
than once.
The intended behaviour of the function is restored by splitting
the dmi output on the regex /^Handle/.
|
|
|
|
|
|
| |
patch included
Thanks to Joe McDonagh for the patch.
|
|
|
|
| |
Thanks to Tim Sharpe for the fix
|
| |
|
|
|
|
| |
Thanks to Jos Backus for the fix.
|
|
|
|
| |
Thanks to Pavol Dilung for the fix.
|
| |
|
|
|
|
| |
Thanks to Benedikt Bohm for the fix.
|
|
|
|
| |
Based on initial patch by James Turnbull
|
|
|
|
|
|
|
|
| |
This patch removes the relationship between the domain fact and LDAP/NIS domains.
domain fact relates to DNS domain - this will avoid the confusion caused
by the LDAP/NIS domain (which might be different to the DNS domain name).
Additionally, if hostname is already in long form, it won't try to build
the fqdn fact from hostname and domain.
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 33fb7709404e706801683e6c47ab7a0a5a1884b1.
This has broken master for some facts (eg OS X facts), it also breaks facter
platform support on win32 as popen3 does not work there.
I'd like to get master working, backlog of patches applied and revisit exec.
Paul
|
|
|
|
| |
This adds a test to ensure we are not prematurely splitting on Handle
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
In addition to the stripping of the output of these facts this patchset:
Refactor - Extracted function to enable easier testing.
Tests - data driven tests for the dmidecode/smbios fact.
Paul
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far messages to stderr haven't been catched by
Facter::Util::Resolution.exec and were insted printed out to
stderr. This will cause facter and even puppet to print to stderr
themself, which is not very nice when running puppetd by cron,
as you might get every run a mail if a command outputs to stderr.
We are now wrapping the command execution with Open3.popen3 to
catch stderr and passing them to the new introduced Facter.warn
method.
We are also catching multiline outputs chomping newlines and
returning an array if there have been more than one line. Otherwise
we return an array containing the different lines.
This prevents in general cases as described in #2766 and should
handle command execution in a bit saner way.
|
|
|
|
|
| |
We can now warn messages that will be passed to Kernel.warn if
debugging is enabled.
|
| |
|
| |
|
|
|
|
|
|
| |
Fix facts added with empty blocks by handling calls to value when setcode not called
Ensure we handle load failures more gracefully
|
|
|
|
|
|
|
|
|
| |
This cleans up xen and vserver detection to enable us to stub out so when we
happen to be running tests on xen we don't report as that.
More cleanup is needed in this area but this should give us a green build.
This renames the tests to be consistent with current naming convention
|
| |
|
| |
|
|
|
|
| |
fact's value when collection has not being yet initialized.
|
|
|
|
|
| |
Solaris orders inet and inet6 seperately. This tests for and fixes this by
uniqueing the list. Will probably need work when we get to ipv6 support.
|
|
|
|
|
|
| |
coverage
switch %x{} call to Facter::Util::Resolution.exec for better testing
|
|\ |
|
| |
| |
| |
| | |
Add tests and utility for virtual fact detection
|
| | |
|
|/
|
|
| |
Use OpenBSD sysctl for manufacturer facts.
|