From 6829a7a4e9a209d9f147da4cb52cf9f64138146d Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Tue, 27 Jul 2010 01:06:14 +0200 Subject: rybackup: ignore eCryptfs mounts on non-hourly intervals --- rybackup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rybackup.py') diff --git a/rybackup.py b/rybackup.py index 47dbb2f..450689b 100755 --- a/rybackup.py +++ b/rybackup.py @@ -115,7 +115,7 @@ def sync(arg): if not path.isdir("%s/%s.1/%s" % (bak['dst'], arg, i[1:])): makedirs("%s/%s.1/%s" % (bak['dst'], arg, i[1:])) - # Mirror directories with rsync (auto. unlinks files that changed) + # Mirror directories with rsync and unlink files that changed call("%s %s %s %s/%s.1/%s" % (bin['rsync'], " ".join(rsyncopt), i, bak['dst'], arg, i[1:]), shell=True) @@ -125,9 +125,9 @@ def sync(arg): # Managing mount points -def mount(action): +def mount(action, arg=""): if action == "mount": - if bak['efs']: + if bak['efs'] and arg == "hourly": # Exit with EAGAIN if eCryptfs is mounted if call("%s -qs ecryptfs %s" % (bin['grep'], files['mounts']), shell=True) == 0: @@ -156,7 +156,7 @@ def main(): raise SystemExit("Error: super user privileges required") try: if argv[1] in count: - mount("mount") + mount("mount", argv[1]) rotate(argv[1]) if argv[1] == "hourly": sync(argv[1]) -- cgit v1.2.3