Unverified Commit a2d4cea9 authored by r-vdp's avatar r-vdp
Browse files

etc: rename the temporary dirs so that they are recognisable

This makes it a lot easier to understand which dir is which
parent 77152405
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -231,13 +231,13 @@ in
      if [[ ! $IN_NIXOS_SYSTEMD_STAGE1 ]] && [[ "${config.system.build.etc}/etc" != "$(readlink -f /run/current-system/etc)" ]]; then
        echo "remounting /etc..."

        tmpMetadataMount=$(mktemp --directory)
        tmpMetadataMount=$(mktemp --directory -t nixos-etc-metadata.XXXXXXXXXX)
        mount --type erofs ${config.system.build.etcMetadataImage} $tmpMetadataMount

        # Mount the new /etc overlay to a temporary private mount.
        # This needs the indirection via a private bind mount because you
        # cannot move shared mounts.
        tmpEtcMount=$(mktemp --directory)
        tmpEtcMount=$(mktemp --directory -t nixos-etc.XXXXXXXXXX)
        mount --bind --make-private $tmpEtcMount $tmpEtcMount
        mount --type overlay overlay \
          --options lowerdir=$tmpMetadataMount::${config.system.build.etcBasedir},${etcOverlayOptions} \