The first is by design, the second is not true.
/etc/default/* is used for old init scripts, not for systemd units.
It actually says that in the file
# This file controls the behaviour of /etc/init.d/snmptrapd
# but not of the corresponding systemd service file.
Onto snmptrapd.conf, let's first put "outputOption n" into the
configuration file, send a trap and check the journal:
Jan 18 17:58:16 elmo snmptrapd[853516]: .1.3.6.1.6.3.1.1.4.1.0 = OID:
.1.3.6.1.6.3.1.1.5.3 .1.3.6.1.2.1.2.2.1.1 = INTEGER: 2
.1.3.6.1.2.1.2.2.1.7 = INTEGER: up(1) .1.3.6.1.2.1.2.2.1.8 =
INTEGER: up(1)
Now lets comment out that line, restart the daemon, send a trap and check
the journal:
Jan 18 18:00:03 elmo snmptrapd[854207]: SNMPv2-MIB::snmpTrapOID.0 = OID:
IF-MIB::linkDown IF-MIB::ifIndex = INTEGER: 2
IF-MIB::ifAdminStatus = INTEGER: up(1) IF-MIB::ifOperStatus =
INTEGER: up(1)
That looks like the configuration file is working.
On top of that, since the ExecStart= line is wrong
It's not, I have no idea what you're trying to do in the configuration file
but it's parsing it fine here.
- Craig