fixed issue where user option is internally transformed to username which is what /proc/mounts reports for cifs mounts

This commit is contained in:
Robert Fach 2015-02-26 14:55:39 +00:00 committed by C. R. Oldham
parent 983d615d5e
commit e8eb6fe6ff

View File

@ -229,6 +229,9 @@ def mounted(name,
if size_match.group('size_unit') == 'g': if size_match.group('size_unit') == 'g':
converted_size = int(size_match.group('size_value')) * 1024 * 1024 converted_size = int(size_match.group('size_value')) * 1024 * 1024
opt = "size={0}k".format(converted_size) opt = "size={0}k".format(converted_size)
# make cifs option user synonym for option username which is reported by /proc/mounts
if fstype in ['cifs'] and opt.split('=')[0] == 'user':
opt = "username={0}".format(opt.split('=')[1])
if opt not in active[real_name]['opts'] \ if opt not in active[real_name]['opts'] \
and opt not in active[real_name]['superopts'] \ and opt not in active[real_name]['superopts'] \