The old Xenial init file does actually already PID tracking via "-p $SNMP_PID" 
of snmpd itself.
That makes sure that the real daemon pid is in there and not other spawned 
tasks.

It has some cleanup to remove said file after stop (even if the daemon itself 
did not).
But in general it seems we can use that file as-is to use --pidfile

Interestingly, the reload action already does --pidfile "$SNMP_PID"
--exec /usr/sbin/snmpd as I'd suggest.

A quick test modifying the script on a system worked, I'll propose the
change for an SRU.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1720109

Title:
  snmpd stop on host stops snmpd on LXD containers

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1720109/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to