lib/ohai/plugins/openbsd/platform.rb in ohai-6.24.2 vs lib/ohai/plugins/openbsd/platform.rb in ohai-7.0.0.rc.0
- old
+ new
@@ -14,10 +14,16 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
-provides "platform", "platform_version"
+Ohai.plugin(:Platform) do
+ provides "platform", "platform_version", "platform_family"
-platform from("uname -s").downcase
-platform_version from("uname -r")
-
+ collect_data(:openbsd) do
+ so = shell_out("uname -s")
+ platform so.stdout.split($/)[0].downcase
+ so = shell_out("uname -r")
+ platform_version so.stdout.split($/)[0]
+ platform_family "openbsd"
+ end
+end