about summary refs log tree commit diff
path: root/nixos/modules/virtualisation
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-09-28 21:50:22 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-09-28 22:15:47 +0200
commite866840a120976ad63882fa53fbddfd714cff93d (patch)
treea950f8f8b93bab50d376f5bf8d0d91525e7c8428 /nixos/modules/virtualisation
parent3fada8c5a04ddd283fc121086700db49b4abd6c7 (diff)
downloadnixlib-e866840a120976ad63882fa53fbddfd714cff93d.tar
nixlib-e866840a120976ad63882fa53fbddfd714cff93d.tar.gz
nixlib-e866840a120976ad63882fa53fbddfd714cff93d.tar.bz2
nixlib-e866840a120976ad63882fa53fbddfd714cff93d.tar.lz
nixlib-e866840a120976ad63882fa53fbddfd714cff93d.tar.xz
nixlib-e866840a120976ad63882fa53fbddfd714cff93d.tar.zst
nixlib-e866840a120976ad63882fa53fbddfd714cff93d.zip
Wait for udev after resizing partitions
Otherwise the EC2 boot may panic.
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r--nixos/modules/virtualisation/amazon-grow-partition.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/amazon-grow-partition.nix b/nixos/modules/virtualisation/amazon-grow-partition.nix
index 31899fae6c02..44a9fa93e7ec 100644
--- a/nixos/modules/virtualisation/amazon-grow-partition.nix
+++ b/nixos/modules/virtualisation/amazon-grow-partition.nix
@@ -39,7 +39,10 @@ in
     '';
 
     boot.initrd.postDeviceCommands = ''
-      [ -e /dev/xvda ] && [ -e /dev/xvda1 ] && TMPDIR=/run sh $(type -P growpart) /dev/xvda 1
+      if [ -e /dev/xvda ] && [ -e /dev/xvda1 ]; then
+        TMPDIR=/run sh $(type -P growpart) /dev/xvda 1
+        udevadm settle
+      fi
     '';
 
   };