1. VectorLinux Core
  2. vinstall

Commits

Rodrigo Bistolfi  committed 2a42c21

Added get_mounted to utils.py

  • Participants
  • Parent commits d697ef3
  • Branches master

Comments (0)

Files changed (1)

File vinstall/backend/utils.py

View file
             return False
 
 
+def get_mounted(mountpoint):
+    """Return device for a mountpoint
+    
+    """
+    for line in open("/etc/mtab"):
+        device, mpoint, _ = line.split(" ", 2)
+        if mountpoint == mpoint
+            return device
+
+
 def supported_filesystems():
     """Returns a list of filesystems supported by the system."""