summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-01-23 15:24:36 -0500
committerScott Moser <smoser@ubuntu.com>2014-01-23 15:24:36 -0500
commit84ad0fd0a5471d650c039241286be17cc1163df6 (patch)
tree33e6bffea66c4999ffe461189ad635dcc8121013
parent573ee6d9d641356374ac616f53cb254d4da7c9db (diff)
downloadvyos-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.
-rw-r--r--cloudinit/util.py4
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)