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
Describe the bug
The boot.initrd.network.postCommands are only executed when the initrd cmdline includes an ip= config line, which is most commonly used for NFS root setups.
The documentation for the option explains no such limitation:
Shell commands to be executed after stage 1 of the boot has initialised the network.
IMO the postCommands should be executed as soon as boot.initrd.networking.enabled is true.
To Reproduce
Steps to reproduce the behavior:
{boot.initrd={kernelModules=["ipv6"];network={enable=true;postCommands='' ip link set up dev eth0 ip addr add 2001:db8::1/64 dev eth0 ip route add default via fe80::1 dev eth0 '';};};}
=> Network will not be configured.
Expected behavior
The commands in boot.initrd.networking.postCommands will be executed and network will be set up.
Metadata
$ niv show nixpkgs
Showing package nixpkgs
Reading sources file
homepage: https://github.com/NixOS/nixpkgs
url: https://github.com/NixOS/nixpkgs-channels/archive/8bf142e001b6876b021c8ee90c2c7cec385fe8e9.tar.gz
owner: NixOS
branch: nixos-19.09
url_template: https://github.com/<owner>/<repo>/archive/<rev>.tar.gz
repo: nixpkgs-channels
type: tarball
sha256: 1z8id8ix24ds9i7cm8g33v54j7xbhcpwzw50wlq00alj00xrq307
description: A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to
rev: 8bf142e001b6876b021c8ee90c2c7cec385fe8e9
Maintainer information:
none given
The text was updated successfully, but these errors were encountered:
As outlined in #71447, postCommands should always be run if networking
in initrd is enabled. regardless if the configuration actually
succeeded.
(cherry picked from commit 5897899)
Ma27
pushed a commit
to Ma27/nixpkgs
that referenced
this issue
Mar 4, 2020
As outlined in NixOS#71447, postCommands should always be run if networking
in initrd is enabled. regardless if the configuration actually
succeeded.
(cherry picked from commit 5897899)
The backport of this patch has been requested in NixOS#79532[1]. The diff is
slightly off the original commit since some changes from
ea7d024 were needed, however this
commit shouldn't be backported as it potentially breaks existing setups.
[1] NixOS#79532 (comment)
Describe the bug
The
boot.initrd.network.postCommands
are only executed when the initrd cmdline includes anip=
config line, which is most commonly used for NFS root setups.The documentation for the option explains no such limitation:
IMO the postCommands should be executed as soon as
boot.initrd.networking.enabled
istrue
.To Reproduce
Steps to reproduce the behavior:
=> Network will not be configured.
Expected behavior
The commands in
boot.initrd.networking.postCommands
will be executed and network will be set up.Metadata
Maintainer information:
none given
The text was updated successfully, but these errors were encountered: