You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than do this, the package should create a systemd preset file at %{_presetdir}/80-amazon-ec2-net-utils.preset (where %{_presetdir} is defined to be /usr/lib/systemd/system-preset on Enterprise Linux) which looks like this:
The script in the spec would then need to systemctl preset each of those services instead (and probably also systemctl daemon-reload before) since it expects to also start services.
The reason for using presets instead of having the script directly enable/disable services is that it persists the preference/requirement that systemd-networkd is used instead of NetworkManager. If another preset on the system with a lower priority (which may be provided by the OS vendor, a package, or the sysadmin) expresses the preference to enable NetworkManager either directly or indirectly in a preset, then this package will stop working correctly once the preset is applied (which could happen when packages are installed/upgraded or deliberately via systemctl preset-all). Presets are how the Fedora packaging guidelines now recommend doing this (and these guidelines would apply to Enterprise Linux as well). With a preset in place, NetworkManager will not be automatically enabled, and only an explicit enable would cause that to happen.
(Edited: I typed the priority as 98 originally because that's what I had been using all day, but this would have to be <90 since the OS defaults are 90-* and systemd uses whatever comes first and doesn't allow later ones to override it)
The text was updated successfully, but these errors were encountered:
The spec currently contains these lines:
Rather than do this, the package should create a systemd preset file at
%{_presetdir}/80-amazon-ec2-net-utils.preset
(where%{_presetdir}
is defined to be/usr/lib/systemd/system-preset
on Enterprise Linux) which looks like this:The script in the spec would then need to
systemctl preset
each of those services instead (and probably alsosystemctl daemon-reload
before) since it expects to also start services.The reason for using presets instead of having the script directly enable/disable services is that it persists the preference/requirement that systemd-networkd is used instead of NetworkManager. If another preset on the system with a lower priority (which may be provided by the OS vendor, a package, or the sysadmin) expresses the preference to enable NetworkManager either directly or indirectly in a preset, then this package will stop working correctly once the preset is applied (which could happen when packages are installed/upgraded or deliberately via
systemctl preset-all
). Presets are how the Fedora packaging guidelines now recommend doing this (and these guidelines would apply to Enterprise Linux as well). With a preset in place, NetworkManager will not be automatically enabled, and only an explicit enable would cause that to happen.(Edited: I typed the priority as 98 originally because that's what I had been using all day, but this would have to be <90 since the OS defaults are
90-*
and systemd uses whatever comes first and doesn't allow later ones to override it)The text was updated successfully, but these errors were encountered: