[PATCH] ipset: Fix syntax error of bash completion in Debian environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Debian packaging tool (lintian) warns the syntax error of bash completion
as it uses the extglob shell option that should be run in
the ** #!/usr/bin/env bash ** and the shell option set should be moved to
global scope.

Signed-off-by: Neutron Soutmun <neo.neutron@xxxxxxxxx>
---
 utils/ipset_bash_completion/ipset_bash_completion |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/utils/ipset_bash_completion/ipset_bash_completion b/utils/ipset_bash_completion/ipset_bash_completion
index cc7ea7b..8a0b91d 100644
--- a/utils/ipset_bash_completion/ipset_bash_completion
+++ b/utils/ipset_bash_completion/ipset_bash_completion
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # -----------------------------------------------------------------
 # Programmable completion code for ipset (netfilter.org)
@@ -47,6 +47,8 @@
 #
 # -----------------------------------------------------------------
 
+shopt -s extglob
+
 # -----------------------------------------------------------------
 # Functions
 # -----------------------------------------------------------------
@@ -537,7 +539,6 @@ done < "${_IPSET_IPLIST_FILE}"
 # -----------------------------------------------------------------
 
 _ipset_complete() {
-shopt -s extglob
 local cur prev cword words ips_version
 local str_action str_setname str_type str_filename
 local str_glob str_regex str_prefix str_suffix
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux