| Summary: | snmpd systemd service needs an EnvironmentFile to change options | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Robert Kennedy <rt> |
| Component: | net-snmp | Assignee: | Jan Safranek <jsafrane> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 16 | CC: | jsafrane |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | net-snmp-5.7.1-3.fc17 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-11-28 13:17:04 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Robert Kennedy
2011-11-10 14:11:49 UTC
I thought following simple /etc/systemd/services/snmpd.service could work, but I got bitten by systemd, it does not like two ExecStart options :(
[Service]
ExecStart=/usr/sbin/snmpd -LS0-5d -f
.include /lib/systemd/system/snmpd.service
Can't you copy /lib/systemd/system/snmpd.service to /etc/systemd/system/snmpd.service and edit it there? /etc/sysconfig kind of sucks. IMHO most users don't really need to edit snmpd options.
If /etc/systemd is supposed to be taking over the role of /etc/sysconfig as well as /etc/init.d that is fine, but I haven't read anything that leads me to believe that. I'm happy moving on to the new hotness of systemd, but losing configurability should not be part of that migration. Copying the file to /etc/systemd/system and replacing it with: [Unit] Description=Simple Network Management Protocol (SNMP) Daemon. After=syslog.target network.target [Service] Type=notify Environment=SNMPDLOG="-LS0-6d" EnvironmentFile=-/etc/sysconfig/snmpd ExecStart=/usr/sbin/snmpd $SNMPDLOG $SNMPDARGS -f ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target has been a reasonable workaround for me but doing so leaves me stranded if net-snmp actually does update their /lib/systemd service file. (In reply to comment #2) > Copying the file to /etc/systemd/system and replacing it with: > > [Unit] > Description=Simple Network Management Protocol (SNMP) Daemon. > After=syslog.target network.target > > [Service] > Type=notify > Environment=SNMPDLOG="-LS0-6d" > EnvironmentFile=-/etc/sysconfig/snmpd > ExecStart=/usr/sbin/snmpd $SNMPDLOG $SNMPDARGS -f > ExecReload=/bin/kill -HUP $MAINPID > > [Install] > WantedBy=multi-user.target > > > has been a reasonable workaround for me but doing so leaves me stranded if > net-snmp actually does update their /lib/systemd service file. This should work well through F16 lifecycle - I do not plan to update service file there unless absolutely necessary. I added /etc/systemd/snmpd to rawhide. |