Skip to content

Commit

Permalink
Client: Added version checks for save_state and configure_nisdomain c…
Browse files Browse the repository at this point in the history
…alls

With FreeIPA 4.5 the functions save_state and configure_nisdomain have gotten
new options. A version check has been added to ipaextras and ipanss to make
sure that the modules are also working with FreeIPA 4.4.
  • Loading branch information
t-woerner committed Feb 9, 2018
1 parent aaea687 commit 9beb31b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 5 additions & 2 deletions library/ipaextras.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,11 @@ def main():
configure_firefox(options, statestore, domain)

if not no_nisdomain:
configure_nisdomain(
options=options, domain=domain, statestore=statestore)
if NUM_VERSION < 40500:
configure_nisdomain(options=options, domain=domain)
else:
configure_nisdomain(options=options, domain=domain,
statestore=statestore)

# Cleanup: Remove CCACHE_FILE
try:
Expand Down
10 changes: 8 additions & 2 deletions library/ipanss.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ def main():
# (if installed)
nscd = services.knownservices.nscd
if nscd.is_installed():
save_state(nscd, statestore)
if NUM_VERSION < 40500:
save_state(nscd)
else:
save_state(nscd, statestore)

try:
nscd_service_action = 'stop'
Expand All @@ -232,7 +235,10 @@ def main():

nslcd = services.knownservices.nslcd
if nslcd.is_installed():
save_state(nslcd, statestore)
if NUM_VERSION < 40500:
save_state(nslcd)
else:
save_state(nslcd, statestore)

##########################################################################

Expand Down

0 comments on commit 9beb31b

Please sign in to comment.