From ac23671386353371d759608fe8d09c72de78ae02 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Sat, 29 May 2010 23:57:41 +0200 Subject: rybackup: mount options can be omitted --- rybackup.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'rybackup.py') diff --git a/rybackup.py b/rybackup.py index eab93dd..259dbcd 100755 --- a/rybackup.py +++ b/rybackup.py @@ -34,14 +34,14 @@ from os import listdir, makedirs bak = { "dst" : "/mnt/nfs/backup", "src" : [ "/etc/", "/root/", "/home/user/", "/mnt/storage/Documents/" ], - "efs" : False, # eCryptfs support + "efs" : False, # eCryptfs support } # Remote backup server, or removable storage rmt = { - "fst" : "nfs", # file-system type - "opt" : "async,vers=3", # mount options - "dev" : "192.168.0.10", # device node or NFS server + "fst" : "nfs", # file-system type + "opt" : "-o async,vers=3", # mount options, if any + "dev" : "192.168.0.10", # device node or NFS host "dst" : "/mnt/backup/clientname" # remote NFS export } @@ -138,9 +138,9 @@ def mount(action): rmt['dev'] = "%s:%s" % (rmt['dev'], rmt['dst']) # Attempt to mount the destination - if call("%s -t %s -o %s %s %s" - % (bin[action], rmt['fst'], rmt['opt'], - rmt['dev'], bak['dst']), shell=True) != 0: + if call("%s -t %s %s %s %s" + % (bin[action], rmt['fst'], rmt['opt'], + rmt['dev'], bak['dst']), shell=True) != 0: raise SystemExit("Error: could not mount destination") elif action == "umount": # Unmount the snapshot mountpoint -- cgit v1.2.3