Commit b0a7500a authored by Daniel Armbruster's avatar Daniel Armbruster Committed by thomas.forbriger
Browse files

optional lock argument for secure copy section

This is a legacy commit from before 2015-05-18.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 5060
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 96c682d2
......@@ -50,6 +50,7 @@
# 07/03/2013 V1.1 provide '-newer' option for copy commands
# 12/03/2013 V1.1.1 add keychain option to secure copy process
# 14/03/2013 V1.1.2 csbackscp wait 10 min on lock
# 15/03/2013 V1.1.3 secure copy option - optional lock of directories
#
# =============================================================================
"""
......@@ -307,7 +308,9 @@ class SecureCopyConverter(Converter):
self.line = self.sectionDict['cronexpr']+' '
if self.sectionDict['keychain']:
self.line += 'source $HOME/.keychain/${HOSTNAME}-sh; '
self.line += self.scriptLocation+'csbackscp -L 600 -l'
self.line += self.scriptLocation+'csbackscp -l'
if self.sectionDict['lock']:
self.line = ' -L '+self.sectionDict['lock']
if self.sectionDict['newer']:
self.line += ' -N "'+self.sectionDict['newer']+'"'
for regex in self.sectionDict['exclude']:
......@@ -430,6 +433,9 @@ class Processor():
copy['newer'] = None
if self.config.has_option(key, 'newer'):
copy['newer'] = self.config.get(key, 'newer', raw=1)
copy['lock'] = None
if self.config.has_option(key, 'lock'):
copy['lock'] = self.config.get(key, 'lock')
except NoOptionError as err:
raise Error("{0}".format(err.message), eCodes.CRON_MissingOption)
except ValueError:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment