2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-27 12:28:01 +00:00

5 Commits

Author SHA1 Message Date
Frode Nordahl
cfba951585 utilities/bashcomp: Fix incorrect file mode.
The bash completion scripts shipped with Open vSwitch currently
have the executable bit set.  This is problematic because the
files do not start with a shebang and as such a user may end up
executing them using the wrong shell.  When installed in a system
the bash shell will source these files and not execute them.

This also triggers Debian lintian warnings [0] and defies Debian
policy [1].

0: https://lintian.debian.org/tags/executable-not-elf-or-script
1: https://www.debian.org/doc/debian-policy/ch-files.html#scripts
Fixes: 423ede182b65 ("utilities: Add bash command-line completion script.")
Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2022-07-12 15:45:42 +02:00
Markos Chandras
2235714c65 utilities: Drop shebang from bash completion script
This fixes the following warning when building Open vSwitch on the
openSUSE Build Service:

  W: non-executable-script /usr/share/bash-completion/completions/ovs-appctl-bashcomp.bash
  This text file contains a shebang or is located in a path dedicated
  for executables, but lacks the executable bits and cannot thus be
  executed. If the file is meant to be an executable script, add the
  executable bits, otherwise remove the shebang or move the file
  elsewhere.

The file is meant to be sourced instead of executed, so we can simply
drop the shebang.

Signed-off-by: Markos Chandras <mchandras@suse.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2018-08-30 14:16:30 -07:00
Zang MingJie
53d9f3838f ovs-appctl-bashcomp: bash_completion shouldn't modify user environment.
Signed-off-by: Zang MingJie <zealot0630@gmail.com>
Acked-by: Alex Wang <alexw@nicira.com>
2015-06-07 13:23:39 -07:00
Alex Wang
b6b0e049fd ovs-appctl-bashcomp: Use better function to complete file.
This commit uses the _filedir function defined in bash_completion
module for file completion.  It will take care of the '/' suffix
for directory.

Signed-off-by: Alex Wang <alexw@nicira.com>
2015-03-18 12:30:47 -07:00
Alex Wang
94ace6ffe4 ovs-appctl-bashcomp: Keep naming consistency.
Before adding the completion script ovs-vsctl-bashcomp.bash for
ovs-vsctl command, this commit renames the ovs-command-compgen.bash
to ovs-appctl-bashcomp.bash to keep the script naming consistent.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-03-12 14:03:44 -07:00