3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #12761 from cransom/amazon-disk0

Do not relocate /nix and /tmp to small disks on AWS
This commit is contained in:
Eelco Dolstra 2016-02-02 11:42:00 +01:00
commit a7694d3d17

View file

@ -68,7 +68,11 @@ let cfg = config.ec2; in
diskNr=$((diskNr + 1))
echo "mounting $device on $mp..."
if mountFS "$device" "$mp" "" ext3; then
if [ -z "$diskForUnionfs" ]; then diskForUnionfs="$mp"; fi
if [ -z "$diskForUnionfs" -a \
$(lsblk -bno size $device) -gt $(lsblk -bno size /dev/xvda1)
]; then
diskForUnionfs="$mp";
fi
fi
else
echo "skipping unknown device type $device"