Whamcloud - gitweb
LU-12734 misc: allow older bash_completion versions 59/36459/3
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 15 Oct 2019 23:07:53 +0000 (17:07 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 5 Nov 2019 18:32:09 +0000 (18:32 +0000)
commit10578849c9a7cb1e1323fb98b270349651b5bf90
treed301c4ed46e01ad9ace5cfcb020c8bb2d1bf2893
parent15443866cc98b1c81551ce8d2172b2902c51eebd
LU-12734 misc: allow older bash_completion versions

Allow the "lctl" bash_completion to work on older versions which
which don't have _init_completions().  Check at runtime if this
function is available, and if not fall back to an older interface.

Has been manually tested with both bash-completion v1.3 and v2.1.

Fixes: f87a7f2656ce ("LU-12734 misc: add bash completion for lctl set/get_param)"
Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I3822c0967354d83d12f299c4be3023b2fc254035
Reviewed-on: https://review.whamcloud.com/36459
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Dominique Martinet <dominique.martinet@cea.fr>
lustre/scripts/bash-completion/lctl