about summary refs log tree commit diff
path: root/nixos/modules/system/boot/grow-partition.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/system/boot/grow-partition.nix')
-rw-r--r--nixos/modules/system/boot/grow-partition.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/grow-partition.nix b/nixos/modules/system/boot/grow-partition.nix
index 1e6f9e442b67..8c9b1502558a 100644
--- a/nixos/modules/system/boot/grow-partition.nix
+++ b/nixos/modules/system/boot/grow-partition.nix
@@ -30,7 +30,7 @@ with lib;
 
     boot.initrd.postDeviceCommands = ''
       rootDevice="${config.fileSystems."/".device}"
-      if [ -e "$rootDevice" ]; then
+      if waitDevice "$rootDevice"; then
         rootDevice="$(readlink -f "$rootDevice")"
         parentDevice="$rootDevice"
         while [ "''${parentDevice%[0-9]}" != "''${parentDevice}" ]; do