nixos/stage-1: Account for hardcoded executable paths

At least pkgs/os-specific/linux/util-linux/default.nix uses
```
    "--enable-fs-paths-default=/run/wrappers/bin:/run/current-system/sw/bin:/sbin"
```

which does not cover stage 1 init's PATH as all executables are put
under /bin/.

Fix util-linux's `mount` usage by symlinking /sbin to it.
This commit is contained in:
Klemens Nanni 2022-05-12 16:18:30 +02:00
parent 9553106832
commit de77849ad6

View File

@ -14,6 +14,8 @@ extraUtils="@extraUtils@"
export LD_LIBRARY_PATH=@extraUtils@/lib
export PATH=@extraUtils@/bin
ln -s @extraUtils@/bin /bin
# hardcoded in util-linux's mount helper search path `/run/wrappers/bin:/run/current-system/sw/bin:/sbin`
ln -s @extraUtils@/bin /sbin
# Copy the secrets to their needed location
if [ -d "@extraUtils@/secrets" ]; then