switch-to-configuration-ng: Document ExecReload reload semantics
Update the compare_units doc comment and add a release-notes entry covering the new reload-instead-of-restart behaviour.
This commit is contained in:
@@ -347,6 +347,8 @@ See <https://github.com/NixOS/nixpkgs/issues/481673>.
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- `switch-to-configuration` now reloads a service instead of restarting it when the only change to its unit is `ExecReload=`, and takes no action when `ExecReload=` is removed. Previously both cases triggered a restart.
|
||||
|
||||
- [`hardware.nvidia.branch`](#opt-hardware.nvidia.branch) was added to select the NVIDIA driver branch; setting [`hardware.nvidia.package`](#opt-hardware.nvidia.package) overrides this.
|
||||
|
||||
- The NixOS NVIDIA module wiring has been updated to match the new `nvidia-x11` output layout.
|
||||
|
||||
@@ -489,9 +489,10 @@ enum UnitComparison {
|
||||
|
||||
// Compare the contents of two unit files and return whether the unit needs to be restarted or
|
||||
// reloaded. If the units differ, the service is restarted unless the only difference is
|
||||
// `X-Reload-Triggers` in the `Unit` section. If this is the only modification, the unit is
|
||||
// reloaded instead of restarted. If the only difference is `Options` in the `[Mount]` section, the
|
||||
// unit is reloaded rather than restarted.
|
||||
// `X-Reload-Triggers` in the `[Unit]` section, `Options` in the `[Mount]` section, or `ExecReload`
|
||||
// in the `[Service]` section, in which case the unit is reloaded rather than restarted. Removing
|
||||
// `ExecReload` is treated as a no-op since the running process is unaffected and the new unit can
|
||||
// no longer be reloaded.
|
||||
fn compare_units(current_unit: &UnitInfo, new_unit: &UnitInfo) -> UnitComparison {
|
||||
let mut ret = UnitComparison::Equal;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user