There are several shell scripts that contain bash specific syntax. This is problematic for the Debian package linter that expects ISO chell syntax. Here are all the scripts to fix:
$ checkbashisms `find . -name "*.sh" -print`
script ./magnum/tests/contrib/gate_hook.sh is already a bash script; skipping
script ./magnum/tests/contrib/copy_instance_logs.sh does not appear to be a /bin/sh script; skipping
script ./magnum/tests/contrib/post_test_hook.sh is already a bash script; skipping
possible bashism in ./magnum/templates/swarm/fragments/write-network-config.sh line 14 (should be 'b = a'):
if [ "$FLANNEL_USE_VXLAN" == "true" ]; then
possible bashism in ./magnum/templates/swarm/fragments/add-proxy.sh line 17 ($BASH_SOMETHING):
if [ -f "$BASH_RC" ]; then
possible bashism in ./magnum/templates/swarm/fragments/add-proxy.sh line 18 ($BASH_SOMETHING):
echo "declare -x http_proxy=$HTTP_PROXY" >> $BASH_RC
possible bashism in ./magnum/templates/swarm/fragments/add-proxy.sh line 20 ($BASH_SOMETHING):
echo "File $BASH_RC does not exist, not setting http_proxy"
possible bashism in ./magnum/templates/swarm/fragments/add-proxy.sh line 25 ($BASH_SOMETHING):
if [ -f $BASH_RC ]; then
possible bashism in ./magnum/templates/swarm/fragments/add-proxy.sh line 26 ($BASH_SOMETHING):
echo "declare -x https_proxy=$HTTPS_PROXY" >> $BASH_RC
possible bashism in ./magnum/templates/swarm/fragments/add-proxy.sh line 28 ($BASH_SOMETHING):
echo "File $BASH_RC does not exist, not setting https_proxy"
possible bashism in ./magnum/templates/swarm/fragments/add-proxy.sh line 32 ($BASH_SOMETHING):
if [ -f "$BASH_RC" ]; then
possible bashism in ./magnum/templates/swarm/fragments/add-proxy.sh line 34 ($BASH_SOMETHING):
echo "declare -x no_proxy=$NO_PROXY" >> $BASH_RC
possible bashism in ./magnum/templates/swarm/fragments/add-proxy.sh line 36 ($BASH_SOMETHING):
echo "declare -x no_proxy=$SWARM_API_IP,$ETCD_SERVER_IP,$SWARM_NODE_IP" >> $BASH_RC
possible bashism in ./magnum/templates/swarm/fragments/add-proxy.sh line 39 ($BASH_SOMETHING):
echo "File $BASH_RC does not exist, not setting no_proxy"
script ./magnum/templates/swarm/fragments/disable-selinux.sh does not appear to have a #! interpreter line;
you may get strange results
possible bashism in ./magnum/templates/swarm/fragments/configure-docker-storage.sh line 7 (${foo:3[:1]}):
device_name=$(ls /dev/disk/by-id | grep ${DOCKER_VOLUME:0:20}$)
possible bashism in ./magnum/templates/swarm/fragments/configure-docker-storage.sh line 14 (let ...):
let attempts--
possible bashism in ./magnum/templates/swarm/fragments/write-docker-service.sh line 26 (should be 'b = a'):
if [ $TLS_DISABLED == 'False' ]; then
script ./magnum/templates/mesos/fragments/configure-mesos-master.sh is already a bash script; skipping
possible bashism in ./magnum/templates/mesos/fragments/add-proxy.sh line 11 ($BASH_SOMETHING):
if [ -f "$BASH_RC" ]; then
possible bashism in ./magnum/templates/mesos/fragments/add-proxy.sh line 12 ($BASH_SOMETHING):
echo "export http_proxy=$HTTP_PROXY" >> $BASH_RC
possible bashism in ./magnum/templates/mesos/fragments/add-proxy.sh line 14 ($BASH_SOMETHING):
echo "File $BASH_RC does not exist, not setting http_proxy"
possible bashism in ./magnum/templates/mesos/fragments/add-proxy.sh line 21 ($BASH_SOMETHING):
if [ -f $BASH_RC ]; then
possible bashism in ./magnum/templates/mesos/fragments/add-proxy.sh line 22 ($BASH_SOMETHING):
echo "export https_proxy=$HTTPS_PROXY" >> $BASH_RC
possible bashism in ./magnum/templates/mesos/fragments/add-proxy.sh line 24 ($BASH_SOMETHING):
echo "File $BASH_RC does not exist, not setting https_proxy"
possible bashism in ./magnum/templates/mesos/fragments/add-proxy.sh line 32 ($BASH_SOMETHING):
if [ -f "$BASH_RC" ]; then
possible bashism in ./magnum/templates/mesos/fragments/add-proxy.sh line 34 ($BASH_SOMETHING):
echo "export no_proxy=$NO_PROXY" >> $BASH_RC
possible bashism in ./magnum/templates/mesos/fragments/add-proxy.sh line 37 ($BASH_SOMETHING):
echo "File $BASH_RC does not exist, not setting no_proxy"
script ./magnum/templates/mesos/fragments/configure-mesos-slave.sh is already a bash script; skipping
possible bashism in ./magnum/templates/kubernetes/fragments/enable-kube-proxy-master.sh line 5 ('function' is useless):
function init_templates {
possible bashism in ./magnum/templates/kubernetes/fragments/configure-kubernetes-minion.sh line 10 (should be 'b = a'):
if [ "$TLS_DISABLED" == "True" ]; then
possible bashism in ./magnum/templates/kubernetes/fragments/configure-kubernetes-minion.sh line 35 (should be 'b = a'):
if [ "$NETWORK_DRIVER" == "flannel" ]; then
possible bashism in ./magnum/templates/kubernetes/fragments/configure-kubernetes-master.sh line 15 (should be 'b = a'):
if [ "$TLS_DISABLED" == "True" ]; then
possible bashism in ./magnum/templates/kubernetes/fragments/enable-kube-proxy-minion.sh line 5 ('function' is useless):
function init_templates {
possible bashism in ./magnum/templates/kubernetes/fragments/enable-kube-proxy-minion.sh line 8 (should be 'b = a'):
if [ "${TLS_DISABLED}" == "True" ]; then
possible bashism in ./magnum/templates/kubernetes/fragments/write-kube-os-config.sh line 8 (${parm/?/pat[/str]}):
AUTH_URL=${AUTH_URL/v3/v2}
possible bashism in ./magnum/templates/kubernetes/fragments/make-cert.sh line 23 (should be 'b = a'):
if [ "$TLS_DISABLED" == "True" ]; then
possible bashism in ./magnum/templates/kubernetes/fragments/make-cert.sh line 30 (alternative test command ([[ foo ]] should be [ foo ])):
if [[ -n "${MASTER_HOSTNAME}" ]]; then
possible bashism in ./magnum/templates/kubernetes/fragments/configure-flannel.sh line 8 (should be 'b = a'):
if [ "$FLANNEL_USE_VXLAN" == "true" ]; then
possible bashism in ./magnum/templates/kubernetes/fragments/make-cert-client.sh line 23 (should be 'b = a'):
if [ "$TLS_DISABLED" == "True" ]; then
possible bashism in ./magnum/templates/kubernetes/fragments/write-network-config.sh line 21 (should be 'b = a'):
if [ "$FLANNEL_USE_VXLAN" == "true" ]; then
possible bashism in ./magnum/templates/kubernetes/fragments/enable-kube-podmaster.sh line 5 ('function' is useless):
function init_templates {
possible bashism in ./magnum/templates/kubernetes/fragments/enable-kube-podmaster.sh line 61 (should be 'b = a'):
if [ "${TLS_DISABLED}" == "True" ]; then
possible bashism in ./magnum/templates/kubernetes/fragments/add-proxy.sh line 19 ($BASH_SOMETHING):
if [ -f "$BASH_RC" ]; then
possible bashism in ./magnum/templates/kubernetes/fragments/add-proxy.sh line 20 ($BASH_SOMETHING):
echo "declare -x http_proxy=$HTTP_PROXY" >> $BASH_RC
possible bashism in ./magnum/templates/kubernetes/fragments/add-proxy.sh line 22 ($BASH_SOMETHING):
echo "File $BASH_RC does not exist, not setting http_proxy"
possible bashism in ./magnum/templates/kubernetes/fragments/add-proxy.sh line 27 ($BASH_SOMETHING):
if [ -f "$BASH_RC" ]; then
possible bashism in ./magnum/templates/kubernetes/fragments/add-proxy.sh line 28 ($BASH_SOMETHING):
echo "declare -x https_proxy=$HTTPS_PROXY" >> $BASH_RC
possible bashism in ./magnum/templates/kubernetes/fragments/add-proxy.sh line 30 ($BASH_SOMETHING):
echo "File $BASH_RC does not exist, not setting https_proxy"
possible bashism in ./magnum/templates/kubernetes/fragments/add-proxy.sh line 35 ($BASH_SOMETHING):
if [ -f "$BASH_RC" ]; then
possible bashism in ./magnum/templates/kubernetes/fragments/add-proxy.sh line 36 ($BASH_SOMETHING):
echo "declare -x no_proxy=$NO_PROXY" >> $BASH_RC
possible bashism in ./magnum/templates/kubernetes/fragments/add-proxy.sh line 38 ($BASH_SOMETHING):
echo "File $BASH_RC does not exist, not setting no_proxy"
script ./magnum/templates/kubernetes/fragments/disable-selinux.sh does not appear to have a #! interpreter line;
you may get strange results
possible bashism in ./magnum/templates/kubernetes/fragments/configure-docker-storage.sh line 7 (${foo:3[:1]}):
device_name=$(ls /dev/disk/by-id | grep ${DOCKER_VOLUME:0:20}$)
possible bashism in ./magnum/templates/kubernetes/fragments/configure-docker-storage.sh line 14 (let ...):
let attempts--
script ./tools/pretty_tox.sh does not appear to be a /bin/sh script; skipping
script ./devstack/plugin.sh does not appear to have a #! interpreter line;
you may get strange results
possible bashism in ./devstack/plugin.sh line 8 (should be '.', not 'source'):
source $DEST/magnum/devstack/lib/magnum
possible bashism in ./devstack/plugin.sh line 12 (alternative test command ([[ foo ]] should be [ foo ])):
if [[ "$1" == "stack" && "$2" == "install" ]]; then
possible bashism in ./devstack/plugin.sh line 12 (should be 'b = a'):
if [[ "$1" == "stack" && "$2" == "install" ]]; then
possible bashism in ./devstack/plugin.sh line 17 (alternative test command ([[ foo ]] should be [ foo ])):
if [[ "$ENABLED_SERVICES" =~ 'm-api' ]]; then
possible bashism in ./devstack/plugin.sh line 19 (should be VAR="${VAR}foo"):
IMAGE_URLS+=",${MAGNUM_GUEST_IMAGE_URL}"
possible bashism in ./devstack/plugin.sh line 26 (alternative test command ([[ foo ]] should be [ foo ])):
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
possible bashism in ./devstack/plugin.sh line 26 (should be 'b = a'):
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
possible bashism in ./devstack/plugin.sh line 37 (alternative test command ([[ foo ]] should be [ foo ])):
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
possible bashism in ./devstack/plugin.sh line 37 (should be 'b = a'):
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
possible bashism in ./devstack/plugin.sh line 49 (alternative test command ([[ foo ]] should be [ foo ])):
if [[ "$1" == "unstack" ]]; then
possible bashism in ./devstack/plugin.sh line 49 (should be 'b = a'):
if [[ "$1" == "unstack" ]]; then
possible bashism in ./devstack/plugin.sh line 53 (alternative test command ([[ foo ]] should be [ foo ])):
if [[ "$1" == "clean" ]]; then
possible bashism in ./devstack/plugin.sh line 53 (should be 'b = a'):
if [[ "$1" == "clean" ]]; then
$
Fix proposed to branch: master /review. openstack. org/302426
Review: https:/