3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #236388 from ElvishJerricco/sd-s1-networkd-stop-on-switch-root

systemd stage 1 networking: Stop systemd-networkd on switch-root
This commit is contained in:
Will Fancher 2023-06-10 00:35:56 -04:00 committed by GitHub
commit 90d69b1634
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -3188,7 +3188,19 @@ let
systemd.contents."/etc/systemd/networkd.conf" = renderConfig cfg.config;
systemd.services.systemd-networkd.wantedBy = [ "initrd.target" ];
systemd.services.systemd-networkd = {
wantedBy = [ "initrd.target" ];
# These before and conflicts lines can be removed when this PR makes it into a release:
# https://github.com/systemd/systemd/pull/27791
before = ["initrd-switch-root.target"];
conflicts = ["initrd-switch-root.target"];
};
systemd.sockets.systemd-networkd = {
wantedBy = [ "initrd.target" ];
before = ["initrd-switch-root.target"];
conflicts = ["initrd-switch-root.target"];
};
systemd.services.systemd-network-generator.wantedBy = [ "sysinit.target" ];
systemd.storePaths = [

View file

@ -12,6 +12,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
systemd.services.check-flush = {
requiredBy = ["multi-user.target"];
before = ["network-pre.target" "multi-user.target"];
wants = ["network-pre.target"];
unitConfig.DefaultDependencies = false;
serviceConfig.Type = "oneshot";
path = [ pkgs.iproute2 pkgs.iputils pkgs.gnugrep ];