[omd-commits] OMD Git: omd: omd backup destination file now relative to workdir

git version control git at mathias-kettner.de
Tue Nov 11 16:19:15 CET 2014


Module:   omd
Branch:   master
Commit:   9774bbd04f2f76c11419655757e9a2169ece1d6d
URL:      http://omdistro.org/projects/omd/repository/revisions/9774bbd04f2f76c11419655757e9a2169ece1d6d

Author:   Lars Michelsen <lm at mathias-kettner.de>
Date:     Tue Nov 11 16:19:11 2014 +0100
Commiter: Lars Michelsen <lm at mathias-kettner.de>
Date:     Tue Nov 11 16:19:11 2014 +0100

omd backup destination file now relative to workdir

---

 packages/omd/omd |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/packages/omd/omd b/packages/omd/omd
index ce4e0f5..b3a0b2e 100644
--- a/packages/omd/omd
+++ b/packages/omd/omd
@@ -2951,6 +2951,8 @@ def main_backup(args, options={}):
     if dest == '-':
         fh = sys.stdout
     else:
+        if dest[0] != '/':
+            dest = g_orig_wd + '/' + dest
         fh = file(dest, 'w')
 
     tar = tarfile.open(fileobj=fh, mode='w:gz')
@@ -3450,6 +3452,7 @@ read_info()
 # site user should always run with site user priviledges. That way
 # we are sure that new files and processes are created under the
 # site user and never as root.
+g_orig_wd = os.getcwd()
 if g_sitename and os.getuid() == 0 and not only_root:
     switch_to_site_user()
 



More information about the omd-commits mailing list