mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
nixos/etc: make re-mounting /etc overlay idempotent
This commit is contained in:
parent
1e1efbcf8c
commit
5df8caced4
3 changed files with 25 additions and 11 deletions
|
@ -238,7 +238,9 @@ in
|
|||
# this should not run because /etc is mounted via a systemd mount unit
|
||||
# instead. To a large extent this mimics what composefs does. Because
|
||||
# it's relatively simple, however, we avoid the composefs dependency.
|
||||
if [[ ! $IN_NIXOS_SYSTEMD_STAGE1 ]]; then
|
||||
# Since this script is not idempotent, it should not run when etc hasn't
|
||||
# changed.
|
||||
if [[ ! $IN_NIXOS_SYSTEMD_STAGE1 ]] && [[ "${config.system.build.etc}/etc" != "$(readlink -f /run/current-system/etc)" ]]; then
|
||||
echo "remounting /etc..."
|
||||
|
||||
tmpMetadataMount=$(mktemp --directory)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue