mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge pull request #271326 from philiptaron/shutdown.target
treewide: depend on `shutdown.target` if `DefaultDependencies=no` in almost every case
This commit is contained in:
commit
c9569af3e0
18 changed files with 43 additions and 18 deletions
|
@ -406,7 +406,8 @@ in
|
|||
ConditionVirtualization = "!container";
|
||||
DefaultDependencies = false; # needed to prevent a cycle
|
||||
};
|
||||
before = [ "systemd-pstore.service" ];
|
||||
before = [ "systemd-pstore.service" "shutdown.target" ];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
wantedBy = [ "systemd-pstore.service" ];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -78,9 +78,10 @@ let
|
|||
value = {
|
||||
description = "Unlock bcachefs for ${fs.mountPoint}";
|
||||
requiredBy = [ mountUnit ];
|
||||
before = [ mountUnit ];
|
||||
bindsTo = [ deviceUnit ];
|
||||
after = [ deviceUnit ];
|
||||
before = [ mountUnit "shutdown.target" ];
|
||||
bindsTo = [ deviceUnit ];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
unitConfig.DefaultDependencies = false;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
|
|
|
@ -130,7 +130,8 @@ let
|
|||
"systemd-ask-password-console.service"
|
||||
] ++ optional (config.boot.initrd.clevis.useTang) "network-online.target";
|
||||
requiredBy = getPoolMounts prefix pool ++ [ "zfs-import.target" ];
|
||||
before = getPoolMounts prefix pool ++ [ "zfs-import.target" ];
|
||||
before = getPoolMounts prefix pool ++ [ "shutdown.target" "zfs-import.target" ];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
unitConfig = {
|
||||
DefaultDependencies = "no";
|
||||
};
|
||||
|
|
|
@ -1410,9 +1410,11 @@ in
|
|||
|
||||
systemd.services.domainname = lib.mkIf (cfg.domain != null) {
|
||||
wantedBy = [ "sysinit.target" ];
|
||||
before = [ "sysinit.target" ];
|
||||
before = [ "sysinit.target" "shutdown.target" ];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
unitConfig.DefaultDependencies = false;
|
||||
serviceConfig.ExecStart = ''${pkgs.nettools}/bin/domainname "${cfg.domain}"'';
|
||||
serviceConfig.Type = "oneshot";
|
||||
};
|
||||
|
||||
environment.etc.hostid = mkIf (cfg.hostId != null) { source = hostidFile; };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue