From: Michael Tremer Date: Sun, 1 Sep 2013 12:52:45 +0000 (+0200) Subject: system: Don't use the rootfs line from /etc/mtab. X-Git-Tag: v2.1.8~7 X-Git-Url: http://git.ipfire.org/?p=oddments%2Ffireinfo.git;a=commitdiff_plain;h=ca85ac3a83a9bbc2e80300da03b50558ecd86beb system: Don't use the rootfs line from /etc/mtab. --- diff --git a/fireinfo/system.py b/fireinfo/system.py index 6f02312..7cca92e 100644 --- a/fireinfo/system.py +++ b/fireinfo/system.py @@ -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:]