summaryrefslogtreecommitdiff
path: root/lib/ohai/plugins/darwin/hostname.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ohai/plugins/darwin/hostname.rb')
-rw-r--r--lib/ohai/plugins/darwin/hostname.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/ohai/plugins/darwin/hostname.rb b/lib/ohai/plugins/darwin/hostname.rb
index ca8e2757..35bc62b4 100644
--- a/lib/ohai/plugins/darwin/hostname.rb
+++ b/lib/ohai/plugins/darwin/hostname.rb
@@ -16,7 +16,11 @@
# limitations under the License.
#
-provides "fqdn", "hostname"
+Ohai.plugin(:DarwinHostname) do
+ provides "fqdn", "hostname"
-hostname from("hostname -s")
-fqdn from("hostname") \ No newline at end of file
+ collect_data do
+ hostname from("hostname -s")
+ fqdn from("hostname")
+ end
+end