diff options
-rwxr-xr-x | snap.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -52,6 +52,8 @@ def borg_lv(lv, target, archive_prefix, dry_run, **args): | |||
52 | bindMounts = ['nix', 'run', 'proc', 'dev', 'sys', pathlib.Path(os.path.expanduser('~')).relative_to('/')] | 52 | bindMounts = ['nix', 'run', 'proc', 'dev', 'sys', pathlib.Path(os.path.expanduser('~')).relative_to('/')] |
53 | if 'SSH_AUTH_SOCK' in os.environ: | 53 | if 'SSH_AUTH_SOCK' in os.environ: |
54 | bindMounts.append(pathlib.Path(os.environ['SSH_AUTH_SOCK']).parent.relative_to('/')) | 54 | bindMounts.append(pathlib.Path(os.environ['SSH_AUTH_SOCK']).parent.relative_to('/')) |
55 | if 'BORG_CACHE_DIR' in os.environ: | ||
56 | bindMounts.append(pathlib.Path(os.environ['BORG_CACHE_DIR']).parent.relative_to('/')) | ||
55 | for bindMount in bindMounts: | 57 | for bindMount in bindMounts: |
56 | (chroot / bindMount).mkdir(parents=True,exist_ok=True) | 58 | (chroot / bindMount).mkdir(parents=True,exist_ok=True) |
57 | subprocess.run(['mount', '--bind', pathlib.Path('/') / bindMount, chroot / bindMount], check=True) | 59 | subprocess.run(['mount', '--bind', pathlib.Path('/') / bindMount, chroot / bindMount], check=True) |