summaryrefslogtreecommitdiff
path: root/hosts/vidhar/borg
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-17 12:57:27 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-17 12:57:27 +0100
commit3e0632e7fb936c86dd0f67e63ab3c4fb9b036d52 (patch)
tree8653fb71690d1a2c5ce8eac83060680d14835fdc /hosts/vidhar/borg
parent1952def96dd4ec2008e0a4f6b905f1706b3d200b (diff)
downloadnixos-3e0632e7fb936c86dd0f67e63ab3c4fb9b036d52.tar
nixos-3e0632e7fb936c86dd0f67e63ab3c4fb9b036d52.tar.gz
nixos-3e0632e7fb936c86dd0f67e63ab3c4fb9b036d52.tar.bz2
nixos-3e0632e7fb936c86dd0f67e63ab3c4fb9b036d52.tar.xz
nixos-3e0632e7fb936c86dd0f67e63ab3c4fb9b036d52.zip
vidhar: ...
Diffstat (limited to 'hosts/vidhar/borg')
-rwxr-xr-xhosts/vidhar/borg/copy.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/hosts/vidhar/borg/copy.py b/hosts/vidhar/borg/copy.py
index 6cfab881..0b863094 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -84,6 +84,7 @@ def copy_archive(src_repo_path, dst_repo_path, entry):
84 child = os.fork() 84 child = os.fork()
85 if child == 0: 85 if child == 0:
86 # print('unshare/chroot', file=stderr) 86 # print('unshare/chroot', file=stderr)
87 unshare.unshare(unshare.CLONE_NEWUSER)
87 unshare.unshare(unshare.CLONE_NEWNS) 88 unshare.unshare(unshare.CLONE_NEWNS)
88 subprocess.run(['mount', '--make-rprivate', '/'], check=True) 89 subprocess.run(['mount', '--make-rprivate', '/'], check=True)
89 chroot = pathlib.Path(tmpdir) / 'chroot' 90 chroot = pathlib.Path(tmpdir) / 'chroot'