diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-01-23 15:24:36 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-01-23 15:24:36 -0500 |
commit | 84ad0fd0a5471d650c039241286be17cc1163df6 (patch) | |
tree | 33e6bffea66c4999ffe461189ad635dcc8121013 /cloudinit/util.py | |
parent | 573ee6d9d641356374ac616f53cb254d4da7c9db (diff) | |
download | vyos-cloud-init-84ad0fd0a5471d650c039241286be17cc1163df6.tar.gz vyos-cloud-init-84ad0fd0a5471d650c039241286be17cc1163df6.zip |
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.
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r-- | cloudinit/util.py | 4 |
1 files 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) |