3
0
Fork 0
forked from mirrors/nixpkgs

Fix using ephemeral disks for /tmp etc. in EC2 instances

This code in amazon-image.nix:

  if mountFS "$device" "$mp" "" auto; then
    if [ -z "$diskForUnionfs" ]; then diskForUnionfs="$mp"; fi
  fi

relies on mountFS to return a zero exit status if mounting
succeeds. But the lustrateRoot check in mountFS was causing a non-zero
exit status. As a result /disk0 would be mounted, but not used for
/tmp.

(cherry picked from commit d082ed8c35dec48aee2afd1303b3c8b2a1b242b0)
This commit is contained in:
Eelco Dolstra 2017-01-03 17:28:55 +01:00
parent c4175a071b
commit b297af42d2
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -318,6 +318,8 @@ mountFS() {
[ "$mountPoint" == "/" ] &&
[ -f "/mnt-root/etc/NIXOS_LUSTRATE" ] &&
lustrateRoot "/mnt-root"
true
}
lustrateRoot () {