summaryrefslogtreecommitdiff
path: root/hosts/vidhar/borg
diff options
context:
space:
mode:
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 c839194c..578394cc 100755
--- a/hosts/vidhar/borg/copy.py
+++ b/hosts/vidhar/borg/copy.py
@@ -112,6 +112,7 @@ def copy_archive(src_repo_path, dst_repo_path, entry):
112 bindMounts.append(pathlib.Path(os.environ['SSH_AUTH_SOCK']).parent.relative_to('/')) 112 bindMounts.append(pathlib.Path(os.environ['SSH_AUTH_SOCK']).parent.relative_to('/'))
113 for bindMount in bindMounts: 113 for bindMount in bindMounts:
114 (chroot / bindMount).mkdir(parents=True,exist_ok=True) 114 (chroot / bindMount).mkdir(parents=True,exist_ok=True)
115 print(*['mount', '--bind', pathlib.Path('/') / bindMount, chroot / bindMount], file=stderr)
115 subprocess.run(['mount', '--bind', pathlib.Path('/') / bindMount, chroot / bindMount], check=True) 116 subprocess.run(['mount', '--bind', pathlib.Path('/') / bindMount, chroot / bindMount], check=True)
116 os.chroot(chroot) 117 os.chroot(chroot)
117 os.chdir('/') 118 os.chdir('/')