This commit makes the bash completion scripts be installed to /etc/bash_completion.d through 'make install' or package installation. This will make the scripts available for each bash session.
An alternative is to put scripts to /usr/share/bash_completion/ directory. However, this is not supported by earlier version of bash completion. Signed-off-by: Alex Wang <al...@nicira.com> --- Makefile.am | 3 +++ debian/openvswitch-switch.install | 2 ++ rhel/openvswitch.spec.in | 2 ++ utilities/automake.mk | 4 ++++ xenserver/openvswitch-xen.spec.in | 2 ++ 5 files changed, 13 insertions(+) diff --git a/Makefile.am b/Makefile.am index 0480d20..5911575 100644 --- a/Makefile.am +++ b/Makefile.am @@ -117,6 +117,7 @@ dist_pkgdata_DATA = dist_pkgdata_SCRIPTS = dist_sbin_SCRIPTS = dist_scripts_SCRIPTS = +dist_completion_SCRIPTS = dist_scripts_DATA = INSTALL_DATA_LOCAL = UNINSTALL_LOCAL = @@ -133,6 +134,7 @@ OVSIDL_BUILT = pkgdata_DATA = sbin_SCRIPTS = scripts_SCRIPTS = +completion_SCRIPTS = scripts_DATA = SUFFIXES = check_DATA = @@ -140,6 +142,7 @@ check_SCRIPTS = pkgconfig_DATA = scriptsdir = $(pkgdatadir)/scripts +completiondir = $(sysconfdir)/bash_completion.d pkgconfigdir = $(libdir)/pkgconfig # This ensures that files added to EXTRA_DIST are always distributed, diff --git a/debian/openvswitch-switch.install b/debian/openvswitch-switch.install index c4f1426..c513b67 100644 --- a/debian/openvswitch-switch.install +++ b/debian/openvswitch-switch.install @@ -1,3 +1,5 @@ +etc/bash_completion.d/ovs-appctl-bashcomp.bash +etc/bash_completion.d/ovs-vsctl-bashcomp.bash usr/bin/ovs-dpctl usr/bin/ovs-dpctl-top usr/bin/ovs-pcap diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in index 56603cc..1ea685d 100644 --- a/rhel/openvswitch.spec.in +++ b/rhel/openvswitch.spec.in @@ -123,6 +123,8 @@ exit 0 %files %defattr(-,root,root) +/etc/bash_completion.d/ovs-appctl-bashcomp.bash +/etc/bash_completion.d/ovs-vsctl-bashcomp.bash /etc/init.d/openvswitch %config(noreplace) /etc/logrotate.d/openvswitch /etc/sysconfig/network-scripts/ifup-ovs diff --git a/utilities/automake.mk b/utilities/automake.mk index 55bf449..435ed38 100644 --- a/utilities/automake.mk +++ b/utilities/automake.mk @@ -22,6 +22,10 @@ scripts_SCRIPTS += \ utilities/ovs-save scripts_DATA += utilities/ovs-lib +completion_SCRIPTS += \ + utilities/ovs-appctl-bashcomp.bash \ + utilities/ovs-vsctl-bashcomp.bash + check_SCRIPTS += \ utilities/ovs-appctl-bashcomp.bash \ utilities/ovs-vsctl-bashcomp.bash diff --git a/xenserver/openvswitch-xen.spec.in b/xenserver/openvswitch-xen.spec.in index 3bae86a..4d98d2e 100644 --- a/xenserver/openvswitch-xen.spec.in +++ b/xenserver/openvswitch-xen.spec.in @@ -430,6 +430,8 @@ exit 0 %files %defattr(-,root,root) +/etc/bash_completion.d/ovs-appctl-bashcomp.bash +/etc/bash_completion.d/ovs-vsctl-bashcomp.bash /etc/init.d/openvswitch /etc/init.d/openvswitch-xapi-update /etc/xapi.d/plugins/openvswitch-cfg-update -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev