]> git.ipfire.org Git - oddments/fireinfo.git/commitdiff
Read mounted filesystems from /proc/mounts instead of /etc/mtab.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Jan 2014 16:45:29 +0000 (17:45 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Jan 2014 16:49:03 +0000 (17:49 +0100)
src/fireinfo/system.py

index 0a60bcc37b185539656699ba14eaa8332080ae04..9db536b2136d4de9c9a131eeeb9e06ccdf451a2a 100644 (file)
@@ -364,7 +364,7 @@ class System(object):
                """
                        Return the dev node of the root disk.
                """
-               with open("/etc/mtab", "r") as f:
+               with open("/proc/mounts", "r") as f:
                        dev, mountpoint, fs, rest = f.readline().split(" ", 3)
                        if mountpoint == "/" and not fs == "rootfs":
                                # Cut off /dev