summaryrefslogtreecommitdiff
path: root/morphlib/fsutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/fsutils.py')
-rw-r--r--morphlib/fsutils.py23
1 files changed, 2 insertions, 21 deletions
diff --git a/morphlib/fsutils.py b/morphlib/fsutils.py
index 400ff7d8..a3b73bf6 100644
--- a/morphlib/fsutils.py
+++ b/morphlib/fsutils.py
@@ -46,33 +46,14 @@ def create_fs(runcmd, partition): # pragma: no cover
runcmd(['mkfs.btrfs', '-L', 'baserock', partition])
-def mount(runcmd, partition, mount_point,
- fstype=None, options=[]): # pragma: no cover
+def mount(runcmd, partition, mount_point, fstype=None): # pragma: no cover
if not os.path.exists(mount_point):
os.mkdir(mount_point)
if not fstype:
fstype = []
else:
fstype = ['-t', fstype]
- if not type(options) == list:
- options = [options]
- runcmd(['mount', partition, mount_point] + fstype + options)
-
-
-def overlay_mount(runcmd, partition, mount_point,
- lowerdir, upperdir, workdir, method): # pragma: no cover
- if method == 'overlayfs':
- options = '-olowerdir=%s,upperdir=%s,workdir=%s' % \
- (lowerdir, upperdir, workdir)
- mount(runcmd, partition, mount_point, 'overlay', options)
- elif method == 'unionfs':
- if not os.path.exists(mount_point):
- os.mkdir(mount_point)
- dir_string = '%s=RW:%s=RO' % (upperdir, lowerdir)
- runcmd(['unionfs', '-o', 'cow', dir_string, mount_point])
- else:
- raise cliapp.AppException('Union filesystem %s not supported' %
- method)
+ runcmd(['mount', partition, mount_point] + fstype)
def unmount(runcmd, mount_point): # pragma: no cover