]> git.ipfire.org Git - oddments/fireinfo.git/commitdiff
system: Don't use the rootfs line from /etc/mtab.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 1 Sep 2013 12:52:45 +0000 (14:52 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 1 Sep 2013 12:52:45 +0000 (14:52 +0200)
fireinfo/system.py

index 6f0231236df7f6bd04b86268bd6b395caa712db7..7cca92e0c47540b3cfbc61d30661ae12c5c6289b 100644 (file)
@@ -363,8 +363,8 @@ class System(object):
                        Return the dev node of the root disk.
                """
                with open("/etc/mtab", "r") as f:
-                       dev, mountpoint, rest = f.readline().split(" ", 2)
-                       if mountpoint == "/":
+                       dev, mountpoint, fs, rest = f.readline().split(" ", 3)
+                       if mountpoint == "/" and not fs == "rootfs":
                                # Cut off /dev
                                dev = dev[5:]