#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.

# Example output
# <<<lnx_uname>>>
# Linux klappmesser 3.10.17 #2 SMP PREEMPT Mon Nov 25 19:51:52 CET 2013 x86_64 GNU/Linux


def inv_lnx_uname(info):
    node = inv_tree("software.os.")
    if len(info) >= 1:
        node["arch"] = info[0][0]
    if len(info) >= 2:
        node["kernel_version"] = info[1][0]


inv_info["lnx_uname"] = {
    "inv_function": inv_lnx_uname,
}
