summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2010-07-26 23:06:14 (GMT)
committerAdrian C. (anrxc) <anrxc@sysphere.org>2010-07-26 23:08:41 (GMT)
commit6829a7a4e9a209d9f147da4cb52cf9f64138146d (patch)
tree24bd3be549f4c872c171e7b3911c7ce1a78acc48
parent0fb7586146389df5e4503254217a8c3dcdb0573b (diff)
downloadrybackup-6829a7a4e9a209d9f147da4cb52cf9f64138146d.tar.xz
rybackup: ignore eCryptfs mounts on non-hourly intervals
-rwxr-xr-xrybackup.py8
1 files changed, 4 insertions, 4 deletions
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])