From 84ad0fd0a5471d650c039241286be17cc1163df6 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Thu, 23 Jan 2014 15:24:36 -0500 Subject: fix broken consumption of /proc/mounts this was checking that the lenghth of the mount line from /proc/mounts was 6, not the number of tokens. --- cloudinit/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudinit/util.py b/cloudinit/util.py index 6fe0e0e6..ce8dacbe 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -1325,9 +1325,9 @@ def mounts(): # Linux: /dev/sda1 on /boot type ext4 (rw,relatime,data=ordered) # FreeBSD: /dev/vtbd0p2 on / (ufs, local, journaled soft-updates) try: - if method == 'proc' and len(mpline) == 6: + if method == 'proc': (dev, mp, fstype, opts, _freq, _passno) = mpline.split() - elif method == 'mount': + else: m = re.search('^(/dev/[\S]+) on (/.*) \((.+), .+, (.+)\)$', mpline) dev = m.group(1) mp = m.group(2) -- cgit v1.2.3