|
| 1 | +<def-group> |
| 2 | + <definition class="inventory" |
| 3 | + id="installed_env_has_net-snmp_package" version="1"> |
| 4 | + <metadata> |
| 5 | + <title>Package net-snmp is installed</title> |
| 6 | + <affected family="unix"> |
| 7 | + <platform>multi_platform_all</platform> |
| 8 | + </affected> |
| 9 | + <description>Checks if package net-snmp is installed.</description> |
| 10 | + <reference ref_id="cpe:/a:net-snmp" source="CPE" /> |
| 11 | + </metadata> |
| 12 | + <criteria> |
| 13 | + <criterion comment="Package net-snmp is installed" test_ref="test_env_has_net-snmp_installed" /> |
| 14 | + </criteria> |
| 15 | + </definition> |
| 16 | + |
| 17 | +{{% if pkg_system == "rpm" %}} |
| 18 | + <linux:rpminfo_test check="all" check_existence="at_least_one_exists" |
| 19 | + id="test_env_has_net-snmp_installed" version="1" |
| 20 | + comment="system has package net-snmp installed"> |
| 21 | + <linux:object object_ref="obj_env_has_net-snmp_installed" /> |
| 22 | + </linux:rpminfo_test> |
| 23 | + <linux:rpminfo_object id="obj_env_has_net-snmp_installed" version="1"> |
| 24 | + <linux:name>net-snmp</linux:name> |
| 25 | + </linux:rpminfo_object> |
| 26 | +{{% elif pkg_system == "dpkg" %}} |
| 27 | + <linux:dpkginfo_test check="all" check_existence="all_exist" |
| 28 | + id="test_env_has_net-snmp_installed" version="1" |
| 29 | + comment="system has package net-snmp installed"> |
| 30 | + <linux:object object_ref="obj_env_has_net-snmp_installed" /> |
| 31 | + </linux:dpkginfo_test> |
| 32 | + <linux:dpkginfo_object id="obj_env_has_net-snmp_installed" version="1"> |
| 33 | + <!-- dpkg systems differ in the package name --> |
| 34 | + <linux:name>snmp</linux:name> |
| 35 | + </linux:dpkginfo_object> |
| 36 | +{{% endif %}} |
| 37 | + |
| 38 | +</def-group> |
0 commit comments