+
+ # For ext[234] enable the default mount options
+ if re.match('^ext[234]$', fs):
+ mopts = filter(
+ lambda p: p.startswith('Default mount options:'),
+ tune2fs('-l', orig_dev[i]).splitlines()
+ )[0].split(':')[1].strip().split()
+
+ if not (len(mopts) == 1 and mopts[0] == '(none)'):
+ for opt in mopts:
+ tune2fs('-o', opt, dev)
+