]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
filesystem-functions.pl: is_btrfs() Skip volumes without a mount point
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 5 May 2024 12:50:04 +0000 (14:50 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 5 May 2024 12:50:04 +0000 (14:50 +0200)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/cfgroot/filesystem-functions.pl

index 22f0902b5813df57d082c8552f57c059ead7b22a..58bacfea2ab7c4cfe7a283946c09f35636872746 100644 (file)
@@ -527,6 +527,9 @@ sub is_btrfs($) {
 
        # Loop through the hash of volumes.
        foreach my $volume (sort keys %volumes) {
+               # Skip volumes which do not have a mount point.
+               next unless ($volumes{$volume}{'mpoint'});
+
                # Skip volume if it is not mounted to the requested mpoint.
                next unless ($volumes{$volume}{'mpoint'} eq "$mpoint");