diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-30 16:38:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-30 16:38:59 +0200 |
commit | 9f4afc01543a862106f35faeaea3797bf3e13d14 (patch) | |
tree | 97583226ce18d3b59ea2f5fbe4f974a95ee2821c | |
parent | 45160216b743b03c18193f711a69f3e837888496 (diff) | |
parent | e2e05a0e4ab9bdff9df2b198808b2d3227af1f41 (diff) | |
download | systemd-9f4afc01543a862106f35faeaea3797bf3e13d14.tar.gz systemd-9f4afc01543a862106f35faeaea3797bf3e13d14.tar.bz2 systemd-9f4afc01543a862106f35faeaea3797bf3e13d14.zip |
Merge pull request #13189 from yuwata/network-initrd-generator-unit
unit: update initrd-network-generator.service
-rw-r--r-- | src/network/generator/main.c | 8 | ||||
-rw-r--r-- | test/TEST-35-NETWORK-GENERATOR/test-01-dhcp.expected/91-default.network (renamed from test/TEST-35-NETWORK-GENERATOR/test-01-dhcp.expected/99-initrd-default.network) | 0 | ||||
-rw-r--r-- | test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/90-bridge99.netdev (renamed from test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/98-initrd-bridge99.netdev) | 0 | ||||
-rw-r--r-- | test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/90-bridge99.network (renamed from test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/98-initrd-bridge99.network) | 0 | ||||
-rw-r--r-- | test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/90-eth0.network (renamed from test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/98-initrd-eth0.network) | 0 | ||||
-rw-r--r-- | test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/90-eth1.network (renamed from test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/98-initrd-eth1.network) | 0 | ||||
-rw-r--r-- | units/meson.build | 2 | ||||
-rw-r--r-- | units/systemd-network-generator.service.in (renamed from units/initrd-network-generator.service.in) | 5 |
8 files changed, 9 insertions, 6 deletions
diff --git a/src/network/generator/main.c b/src/network/generator/main.c index f5f9b04afc..52014aa8be 100644 --- a/src/network/generator/main.c +++ b/src/network/generator/main.c @@ -22,8 +22,8 @@ static int network_save(Network *network, const char *dest_dir) { assert(network); - r = asprintf(&filename, "%s-initrd-%s.network", - isempty(network->ifname) ? "99" : "98", + r = asprintf(&filename, "%s-%s.network", + isempty(network->ifname) ? "91" : "90", isempty(network->ifname) ? "default" : network->ifname); if (r < 0) return log_oom(); @@ -44,7 +44,7 @@ static int netdev_save(NetDev *netdev, const char *dest_dir) { assert(netdev); - r = asprintf(&filename, "98-initrd-%s.netdev", + r = asprintf(&filename, "90-%s.netdev", netdev->ifname); if (r < 0) return log_oom(); @@ -65,7 +65,7 @@ static int link_save(Link *link, const char *dest_dir) { assert(link); - r = asprintf(&filename, "98-initrd-%s.link", + r = asprintf(&filename, "90-%s.link", link->ifname); if (r < 0) return log_oom(); diff --git a/test/TEST-35-NETWORK-GENERATOR/test-01-dhcp.expected/99-initrd-default.network b/test/TEST-35-NETWORK-GENERATOR/test-01-dhcp.expected/91-default.network index e42ce1e311..e42ce1e311 100644 --- a/test/TEST-35-NETWORK-GENERATOR/test-01-dhcp.expected/99-initrd-default.network +++ b/test/TEST-35-NETWORK-GENERATOR/test-01-dhcp.expected/91-default.network diff --git a/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/98-initrd-bridge99.netdev b/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/90-bridge99.netdev index 97c22485b7..97c22485b7 100644 --- a/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/98-initrd-bridge99.netdev +++ b/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/90-bridge99.netdev diff --git a/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/98-initrd-bridge99.network b/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/90-bridge99.network index f8d19baaea..f8d19baaea 100644 --- a/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/98-initrd-bridge99.network +++ b/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/90-bridge99.network diff --git a/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/98-initrd-eth0.network b/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/90-eth0.network index 8842b57921..8842b57921 100644 --- a/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/98-initrd-eth0.network +++ b/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/90-eth0.network diff --git a/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/98-initrd-eth1.network b/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/90-eth1.network index feff4f5ba8..feff4f5ba8 100644 --- a/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/98-initrd-eth1.network +++ b/test/TEST-35-NETWORK-GENERATOR/test-02-bridge.expected/90-eth1.network diff --git a/units/meson.build b/units/meson.build index 5d2f723a70..cf4fe2e7bf 100644 --- a/units/meson.build +++ b/units/meson.build @@ -119,7 +119,6 @@ in_units = [ ['debug-shell.service', ''], ['emergency.service', ''], ['initrd-cleanup.service', ''], - ['initrd-network-generator.service', 'ENABLE_NETWORKD'], ['initrd-parse-etc.service', ''], ['initrd-switch-root.service', ''], ['initrd-udevadm-cleanup-db.service', ''], @@ -175,6 +174,7 @@ in_units = [ 'dbus-org.freedesktop.machine1.service'], ['systemd-modules-load.service', 'HAVE_KMOD', 'sysinit.target.wants/'], + ['systemd-network-generator.service', 'ENABLE_NETWORKD'], ['systemd-networkd.service', 'ENABLE_NETWORKD'], ['systemd-networkd-wait-online.service', 'ENABLE_NETWORKD'], ['systemd-nspawn@.service', ''], diff --git a/units/initrd-network-generator.service.in b/units/systemd-network-generator.service.in index f9261961b7..e314aded9b 100644 --- a/units/initrd-network-generator.service.in +++ b/units/systemd-network-generator.service.in @@ -10,8 +10,11 @@ [Unit] Description=Generate network units from Kernel command line DefaultDependencies=no -Before=network-pre.target initrd-root-device.target initrd-root-fs.target initrd.target +Before=network-pre.target [Service] Type=oneshot ExecStart=@rootlibexecdir@/systemd-network-generator + +[Install] +WantedBy=network-pre.target |