74d5adcb4d
This solves the problem that modprobe does not know about $MODULE_DIR when run via sudo, and instead wrongly tries to read /lib/modules/: $ sudo strace -efile modprobe foo |& grep modules open("/lib/modules/3.14.37/modules.softdep", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/lib/modules/3.14.37/modules.dep.bin", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/lib/modules/3.14.37/modules.dep.bin", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/lib/modules/3.14.37/modules.alias.bin", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) Without this patch, one would have to use sudo -E (preserves environment vars). But that option is reserved for sudo users with extra rights (SETENV), so it's not a solution. environment.sessionVariables are set by PAM, so they are included in the environment used by sudo. |
||
---|---|---|
.. | ||
loader | ||
coredump.nix | ||
emergency-mode.nix | ||
kernel.nix | ||
kexec.nix | ||
luksroot.nix | ||
modprobe.nix | ||
networkd.nix | ||
pbkdf2-sha512.c | ||
readonly-mountpoint.c | ||
resolved.nix | ||
shutdown.nix | ||
stage-1-init.sh | ||
stage-1.nix | ||
stage-2-init.sh | ||
stage-2.nix | ||
systemd-lib.nix | ||
systemd-unit-options.nix | ||
systemd.nix | ||
timesyncd.nix | ||
tmp.nix |