Avoid external command for reading filesystem type list.

This eliminates the use of cat in favour of plain and ordinary read; despite
the brief RedHat reintroduction of the kernel bug when using select on files
in /proc, this isn't worth working around in some-but-not-all places.

It also eliminates most of the lines while still having the same effect,
making the code much cleaner.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Faster, sysfs based interface listing for Linux.

This reimplements "obtain a list of all interfaces" to use sysfs, where
available, since it is significantly faster and cheaper than doing the same
through forking and executing an external command.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Conflicts:
	spec/unit/util/ip_spec.rb
Use simpler DSL for declaring external commands.

When a fact is simply the result of running an external command, a block isn't
needed - just the command string.

This changes a bunch of facts to use that shorter, simpler form as an example
to those who follow about how they should be declared.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Conflicts:
	lib/facter/physicalprocessorcount.rb
	lib/facter/processor.rb
Avoid using cat to read files.

...because, seriously, UUOC is no laughing matter.

Don't condone cat abuse.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Conflicts:
	lib/facter/operatingsystemrelease.rb
Trivial whitespace cleanup.

Literally, one misplaced space gone.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Fixup failures after addressing merge conflicts
Merge branch 'misc-exec-to-ruby-transformations'

* misc-exec-to-ruby-transformations:
  Fixup failures after addressing merge conflicts
  Trivial whitespace cleanup.
  Avoid using cat to read files.
  Use simpler DSL for declaring external commands.
  Faster, sysfs based interface listing for Linux.
  Avoid external command for reading filesystem type list.