From: Michael Tremer Date: Tue, 28 Jan 2014 16:45:29 +0000 (+0100) Subject: Read mounted filesystems from /proc/mounts instead of /etc/mtab. X-Git-Tag: v2.1.8~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c916f644c57b638b3128d0e882c32bf50ea29631;p=oddments%2Ffireinfo.git Read mounted filesystems from /proc/mounts instead of /etc/mtab. --- diff --git a/src/fireinfo/system.py b/src/fireinfo/system.py index 0a60bcc..9db536b 100644 --- a/src/fireinfo/system.py +++ b/src/fireinfo/system.py @@ -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