diff options
author | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2014-05-16 09:50:24 +0000 |
---|---|---|
committer | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2014-05-16 09:50:24 +0000 |
commit | 5718131cd93880739149991fda6ca890828946d8 (patch) | |
tree | 113230b8f627f4cace3927ce9be70e8166b53f88 /morphlib | |
parent | d8436a55926b6445d3afaa96546a485896291ab7 (diff) | |
download | morph-5718131cd93880739149991fda6ca890828946d8.tar.gz |
Fix state subvolume generator to preserve permissionsbaserock/danielsilverstone/vagrant-support
shutil.move() does not preserve permissions, file modes, ownerships etc,
resulting in much confusion when prepopulating a non-root user during
deployment. This change to `mv` fixes that.
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/writeexts.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/morphlib/writeexts.py b/morphlib/writeexts.py index 3f9c33d5..b4912db1 100644 --- a/morphlib/writeexts.py +++ b/morphlib/writeexts.py @@ -281,7 +281,7 @@ class WriteExtension(cliapp.Application): self.status(msg='Moving existing data to %s subvolume' % subvolume) for filename in files: filepath = os.path.join(existing_state_dir, filename) - shutil.move(filepath, subvolume) + cliapp.runcmd(['mv', filepath, subvolume]) def complete_fstab_for_btrfs_layout(self, system_dir): '''Fill in /etc/fstab entries for the default Btrfs disk layout. |