From 5718131cd93880739149991fda6ca890828946d8 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Fri, 16 May 2014 09:50:24 +0000 Subject: Fix state subvolume generator to preserve permissions 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. --- morphlib/writeexts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- cgit v1.2.1