[pve-devel] [PATCH storage] nfs: is_mounted: match /^nfs.*/ type

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Dec 9 13:22:19 CET 2015


This is consistent with the old behavior.
---
 NOTE: While this is equivalent to what we had before I wonder if it
 makes sense to use /^nfs[34]?$/ instead...
 PVE/Storage/NFSPlugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Storage/NFSPlugin.pm b/PVE/Storage/NFSPlugin.pm
index e1107fd..df00f37 100644
--- a/PVE/Storage/NFSPlugin.pm
+++ b/PVE/Storage/NFSPlugin.pm
@@ -22,7 +22,7 @@ sub nfs_is_mounted {
 
     $mountdata = PVE::ProcFSTools::parse_proc_mounts() if !$mountdata;
     return $mountpoint if grep {
-	$_->[2] eq 'nfs' &&
+	$_->[2] =~ /^nfs/ &&
 	$_->[0] =~ m|^\Q$source\E/?$| &&
 	$_->[1] eq $mountpoint
     } @$mountdata;
-- 
2.1.4





More information about the pve-devel mailing list