fix serverca default in kojivmd
This commit is contained in:
parent
2f8c4ac25b
commit
3461e334b2
1 changed files with 12 additions and 1 deletions
13
vm/kojivmd
13
vm/kojivmd
|
|
@ -134,7 +134,7 @@ def get_options():
|
|||
'allowed_scms': '',
|
||||
'cert': '/etc/kojivmd/client.crt',
|
||||
'ca': '', # FIXME: Remove in next major release
|
||||
'serverca': '/etc/kojivmd/serverca.crt'}
|
||||
'serverca': None}
|
||||
if config.has_section('kojivmd'):
|
||||
for name, value in config.items('kojivmd'):
|
||||
if name in ['sleeptime', 'maxjobs', 'minspace', 'minmem',
|
||||
|
|
@ -157,6 +157,17 @@ def get_options():
|
|||
if getattr(options, name, None) is None:
|
||||
setattr(options, name, value)
|
||||
|
||||
# special handling for cert defaults
|
||||
cert_defaults = {
|
||||
'cert': '/etc/kojira/client.crt',
|
||||
'serverca': '/etc/kojira/serverca.crt',
|
||||
}
|
||||
for name in cert_defaults:
|
||||
if getattr(options, name, None) is None:
|
||||
fn = cert_defaults[name]
|
||||
if os.path.exists(fn):
|
||||
setattr(options, name, fn)
|
||||
|
||||
#make sure workdir exists
|
||||
if not os.path.exists(options.workdir):
|
||||
koji.ensuredir(options.workdir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue