summaryrefslogtreecommitdiff
path: root/morphlib/plugins/tarball-systembuilder_plugin.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-07-26 11:12:35 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-07-26 12:01:58 +0100
commit7fa0fe6fca5af3fc9b917ee6e10239efc265b1aa (patch)
tree8eece0119eb0cfac9bda13e7df023d4493d61048 /morphlib/plugins/tarball-systembuilder_plugin.py
parent05fe245d1771ec25d8675b2dd9e4aeee6b22802c (diff)
downloadmorph-7fa0fe6fca5af3fc9b917ee6e10239efc265b1aa.tar.gz
Move fstab creation into base class
Diffstat (limited to 'morphlib/plugins/tarball-systembuilder_plugin.py')
-rw-r--r--morphlib/plugins/tarball-systembuilder_plugin.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/morphlib/plugins/tarball-systembuilder_plugin.py b/morphlib/plugins/tarball-systembuilder_plugin.py
index 5582eec2..9b3f11f2 100644
--- a/morphlib/plugins/tarball-systembuilder_plugin.py
+++ b/morphlib/plugins/tarball-systembuilder_plugin.py
@@ -50,7 +50,7 @@ class RootfsTarballBuilder(SystemKindBuilder): # pragma: no cover
mount_point = self.staging_area.destdir(self.artifact.source)
factory_path = mount_point
self.unpack_strata(factory_path)
- self._create_fstab(factory_path)
+ self.create_fstab(factory_path)
if arch in ('x86', 'x86_64'):
self._create_extlinux_config(factory_path)
if arch in ('arm',):
@@ -73,18 +73,6 @@ class RootfsTarballBuilder(SystemKindBuilder): # pragma: no cover
self.save_build_times()
return [self.artifact]
- def _create_fstab(self, path):
- self.app.status(msg='Creating fstab in %(path)s',
- path=path, chatty=True)
- with self.build_watch('create-fstab'):
- fstab = os.path.join(path, 'etc', 'fstab')
- if not os.path.exists(os.path.dirname(fstab)):# FIXME: should exist
- os.makedirs(os.path.dirname(fstab))
- with open(fstab, 'w') as f:
- f.write('proc /proc proc defaults 0 0\n')
- f.write('sysfs /sys sysfs defaults 0 0\n')
- f.write('/dev/sda1 / btrfs defaults,rw,noatime 0 1\n')
-
def _create_extlinux_config(self, path):
self.app.status(msg='Creating extlinux.conf in %(path)s',
path=path, chatty=True)