add support for systemd on Ubuntu and improve it on Debian #281
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request (PR) description
The transition to systemd in Ubuntu and Debian is not completely reflected in this module. Systemd support for
snmpd
for Debian was added, but not for Ubuntu. Support forsnmpdtrapd
lacks on Debian and Ubuntu.Because systemd ignores the sysconfig files in /etc/default/, parameters set in this module (for example
snmp_options
) have no effect on the managed system.This PR adds the necessary systemd override files with the default options equal to those in their respective distribution.
The sysconfig files are still present to assure backwards compatibility with other tools or init systems.
This commit may have an impact in environments with custom parameters (for for example
snmpd_options
orsnmptrapd_options
). Because these were ignored in the past, the snmp daemon way fail to restart when the parameter values are incompatible with systemd. For example, the .service files in Debian and Ubuntu assume that the snmp(trap)d process remains in foreground (-f` option).Some parts of the test code that were no longer reached as a result of phasing out support for older os versions, have been removed.
This PR also includes support for Debian 12.(#279)
This Pull Request (PR) fixes the following issues
Fixes #280