From 3b6a4711198d6b68c6a7350d30faa650aa9863c6 Mon Sep 17 00:00:00 2001 From: uqam-fob Date: Wed, 15 Nov 2017 01:31:17 -0500 Subject: [PATCH] explorer/memory: Support OpenBSD (#602) Adds support to detect the amount of memory available on OpenBSD systems. --- cdist/conf/explorer/memory | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cdist/conf/explorer/memory b/cdist/conf/explorer/memory index 05db865f..4e3efff8 100755 --- a/cdist/conf/explorer/memory +++ b/cdist/conf/explorer/memory @@ -2,6 +2,7 @@ # # 2014 Daniel Heule (hda at sfs.biz) # 2014 Thomas Oettli (otho at sfs.biz) +# Copyright 2017, Philippe Gregoire # # This file is part of cdist. # @@ -28,6 +29,10 @@ case "$os" in echo "$(sysctl -n hw.memsize)/1024" | bc ;; + "openbsd") + echo "$(sysctl -n hw.physmem) / 1048576" | bc + ;; + *) if [ -r /proc/meminfo ]; then grep "MemTotal:" /proc/meminfo | awk '{print $2}'