about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2024-01-23 18:01:22 +0000
committerGitHub <noreply@github.com>2024-01-23 18:01:22 +0000
commit0684df09d4139c1f263508a95fbe48751aa43159 (patch)
tree1200083fc5532c1bdafd3d7f5bae4e56aa6c66c4 /nixos
parent4a5606d31f1dfab7d55064eb12478e7217b46630 (diff)
parent01a65d81f31318c45659b5cdf6870d7ffe835baa (diff)
downloadnixlib-0684df09d4139c1f263508a95fbe48751aa43159.tar
nixlib-0684df09d4139c1f263508a95fbe48751aa43159.tar.gz
nixlib-0684df09d4139c1f263508a95fbe48751aa43159.tar.bz2
nixlib-0684df09d4139c1f263508a95fbe48751aa43159.tar.lz
nixlib-0684df09d4139c1f263508a95fbe48751aa43159.tar.xz
nixlib-0684df09d4139c1f263508a95fbe48751aa43159.tar.zst
nixlib-0684df09d4139c1f263508a95fbe48751aa43159.zip
Merge staging-next into staging
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/system/boot/loader/grub/install-grub.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl
index d1e7a0cb8178..6f0f62546a01 100644
--- a/nixos/modules/system/boot/loader/grub/install-grub.pl
+++ b/nixos/modules/system/boot/loader/grub/install-grub.pl
@@ -136,7 +136,6 @@ sub GetFs {
         chomp $fs;
         my @fields = split / /, $fs;
         my $mountPoint = $fields[4];
-        next unless -d $mountPoint;
         my @mountOptions = split /,/, $fields[5];
 
         # Skip the optional fields.
@@ -155,6 +154,11 @@ sub GetFs {
 
         # Is it better than our current match?
         if (length($mountPoint) > length($bestFs->mount)) {
+
+            # -d performs a stat, which can hang forever on network file systems,
+            # so we only make this call last, when it's likely that this is the mount point we need.
+            next unless -d $mountPoint;
+
             $bestFs = Fs->new(device => $device, type => $fsType, mount => $mountPoint);
         }
     }