Giter VIP home page Giter VIP logo

Comments (8)

hotid avatar hotid commented on June 17, 2024
diff --git a/manifests/params.pp b/manifests/params.pp
index 1c9566d..c531828 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -472,8 +472,14 @@ class snmp::params {
       $sysconfig                = '/etc/default/snmpd'
       $var_net_snmp             = '/var/lib/snmp'
       $varnetsnmp_perms         = '0755'
-      $varnetsnmp_owner         = 'snmp'
-      $varnetsnmp_group         = 'snmp'
+
+      if (versioncmp($::operatingsystemmajrelease, '9') >= 0) {
+        $varnetsnmp_owner = 'Debian-snmp'
+        $varnetsnmp_group = 'Debian-snmp'
+      } else {
+        $varnetsnmp_owner         = 'snmp'
+        $varnetsnmp_group         = 'snmp'
+      }

       $client_package_name      = 'snmp'
       $client_config            = '/etc/snmp/snmp.conf'

from puppet-snmp.

tamepenguin avatar tamepenguin commented on June 17, 2024
diff --git a/tmp/origsnmp/manifests/params.pp b/manifests/params.pp
index 1c9566d..15ee810 100644
--- a/tmp/origsnmp/manifests/params.pp
+++ b/manifests/params.pp
@@ -463,17 +463,22 @@ class snmp::params {
       $trap_service_name        = 'snmptrapd'
     }
     'Debian': {
+      if $::operatingsystemmajrelease == "9" {
+        $varnetsnmp_owner = "Debian-snmp"
+        $varnetsnmp_group = "Debian-snmp"
+      } else {
+        $varnetsnmp_owner = "snmp"
+        $varnetsnmp_group = "snmp"
+      }
       $package_name             = 'snmpd'
       $service_config           = '/etc/snmp/snmpd.conf'
       $service_config_perms     = '0600'
       $service_config_dir_group = 'root'
       $service_name             = 'snmpd'
-      $snmpd_options            = '-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid'
+      $snmpd_options            = "-Lsd -Lf /dev/null -u $varnetsnmp_owner -g $varnetsnmp_group -I -smux -p /var/run/snmpd.pid"
       $sysconfig                = '/etc/default/snmpd'
       $var_net_snmp             = '/var/lib/snmp'
       $varnetsnmp_perms         = '0755'
-      $varnetsnmp_owner         = 'snmp'
-      $varnetsnmp_group         = 'snmp'
 
       $client_package_name      = 'snmp'
       $client_config            = '/etc/snmp/snmp.conf'

Altough systemd does not use /etc/default/snmpd in this case, it's confusing to have settings different in different places.
Also, there is apparently a Debian remix without systemd :)

from puppet-snmp.

hostingnuggets avatar hostingnuggets commented on June 17, 2024

Any news regarding this issue?

from puppet-snmp.

razorsedge avatar razorsedge commented on June 17, 2024

PR in #109

from puppet-snmp.

pawel-kuwalek avatar pawel-kuwalek commented on June 17, 2024

update, PR in #113

from puppet-snmp.

xraystyle avatar xraystyle commented on June 17, 2024

@razorsedge Are you still maintaining this project? We're still hoping to get #113 merged in so we can use it without forking this module.

from puppet-snmp.

razorsedge avatar razorsedge commented on June 17, 2024

Merged into the develop branch.

from puppet-snmp.

razorsedge avatar razorsedge commented on June 17, 2024

Released with razorsedge/snmp version 3.9.0.

from puppet-snmp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.