Your message dated Mon, 5 Mar 2018 20:32:25 +1100
with message-id <20180305093224.ga25...@enc.com.au>
and subject line Re: snmptrapd: Systemd service unit definition of snmptrapd 
ignoring settings in /etc/default/snmptrapd
has caused the Debian Bug report #887423,
regarding snmptrapd: Systemd service unit definition of snmptrapd ignoring 
settings in /etc/default/snmptrapd
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
887423: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=887423
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: snmptrapd
Version: 5.7.3+dfsg-1.7
Severity: normal

Dear Maintainer,

I have to use the snmptrapd with some special mib-files from the
vendors of my hardware suppliers (like Dell, Brocate, Enterasys, Sun,
Rittal, ...).
Therefor I defined the MIBSDIR environment variable on my own in the
file /etc/default/snmptrapd.

With the introduction of systemd there is a systemd service unit file
provided in the package snmptrapd, located at
/lib/systemd/system/snmptrapd.service
Unfortunately this file contains the environment MIBSDIR hard coded.

Because I would prefer to change only files in /etc for configuration
issues I would ask, if you can change the systemd service unit file like
this:
---
[Unit]
Description=Simple Network Management Protocol (SNMP) Trap Daemon.
After=network.target
ConditionPathExists=/etc/snmp/snmptrapd.conf

[Service]
EnvironmentFile=/etc/default/snmptrapd
Type=simple
ExecStart=/usr/sbin/snmptrapd -f $TRAPDOPTS
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target
---

With the parameter EnvironmentFile you can read the configuration from
/etc/default/snmptrapd and so you only have one file for the old and the
new init way.

I hope this helps and you can realize again the flexibility of the
configuration.

Best regards,
Ingo Rauschenberg





-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages snmptrapd depends on:
ii  init-system-helpers  1.48
ii  libc6                2.24-11+deb9u1
ii  libmariadbclient18   10.1.26-0+deb9u1
ii  libsnmp30            5.7.3+dfsg-1.7
ii  libwrap0             7.6.q-26
ii  snmpd                5.7.3+dfsg-1.7
ii  zlib1g               1:1.2.8.dfsg-5

Versions of packages snmptrapd recommends:
ii  perl  5.24.1-3+deb9u2

snmptrapd suggests no packages.

-- Configuration Files:
/etc/default/snmptrapd changed:
MIBSDIR=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp:/etc/snmp/mibs/Dell:/etc/snmp/mibs/SUN:/etc/snmp/mibs/APC:/etc/snmp/mibs/SUN-MC:/etc/snmp/mibs/Brocade_Fabric_OS_v7.0.2d:/etc/snmp/mibs/Infortrend:/etc/snmp/mibs/Rittal:/etc/snmp/mibs/enterasys
MIBS=ALL
TRAPDRUN=yes
TRAPDOPTS="-Lsd -c /etc/snmp/snmptrapd.conf"

/etc/snmp/snmptrapd.conf changed:
disableAuthorization yes
traphandle default /usr/bin/perl /etc/a1-management/snmp/print_traps.pl


-- no debconf information

--- End Message ---
--- Begin Message ---
Vincent Bernat <ber...@debian.org> wrote:
> You can override anything by using "systemctl edit snmptrapd.service"
> and put:
> 
> [Service]
> Environment="MIBSDIR=..."

This is the correct way to handle systemd init definitions. There is
also a note about the /etc/default/snmptrapd file.

 - Craig
-- 
Craig Small               https://dropbear.xyz/     csmall at : enc.com.au
Debian GNU/Linux          https://www.debian.org/   csmall at : debian.org
Mastodon: @smalls...@social.dropbear.xyz               Twitter: @smallsees  
GPG fingerprint:        5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5

--- End Message ---

Reply via email to