Skip to content

Commit

Permalink
Fix some linter warnings, part 11 (#267)
Browse files Browse the repository at this point in the history
* Fix some linter warnings, part 11
* fixing another negative exit code check
  • Loading branch information
digitalfishpond authored and kornicameister committed Oct 20, 2017
1 parent 22fee85 commit 38bda1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions monasca-agent-collector/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/ash
# shellcheck shell=dash
# (C) Copyright 2017 Hewlett Packard Enterprise Development LP

set -x
Expand All @@ -9,7 +10,7 @@ USER_PLUGINS="/plugins.d"
AGENT_CONF="/etc/monasca/agent"
AGENT_PLUGINS="$AGENT_CONF/conf.d"

if [ "$KEYSTONE_DEFAULTS_ENABLED" == "true" ]; then
if [ "$KEYSTONE_DEFAULTS_ENABLED" = "true" ]; then
export OS_AUTH_URL=${OS_AUTH_URL:-"http://keystone:35357/v3/"}
export OS_USERNAME=${OS_USERNAME:-"monasca-agent"}
export OS_PASSWORD=${OS_PASSWORD:-"password"}
Expand All @@ -29,8 +30,7 @@ template () {
}

if [ "$HOSTNAME_FROM_KUBERNETES" = "true" ]; then
AGENT_HOSTNAME=$(python /kubernetes_get_host.py)
if [ $? != 0 ]; then
if ! AGENT_HOSTNAME=$(python /kubernetes_get_host.py); then
echo "Error getting hostname from Kubernetes"
return 1
fi
Expand Down
6 changes: 3 additions & 3 deletions monasca-agent-forwarder/start.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/ash
# shellcheck shell=dash
# (C) Copyright 2017 Hewlett Packard Enterprise Development LP

set -x

AGENT_CONF="/etc/monasca/agent"

if [ "$KEYSTONE_DEFAULTS_ENABLED" == "true" ]; then
if [ "$KEYSTONE_DEFAULTS_ENABLED" = "true" ]; then
export OS_AUTH_URL=${OS_AUTH_URL:-"http://keystone:35357/v3/"}
export OS_USERNAME=${OS_USERNAME:-"monasca-agent"}
export OS_PASSWORD=${OS_PASSWORD:-"password"}
Expand All @@ -23,8 +24,7 @@ template () {
}

if [ "$HOSTNAME_FROM_KUBERNETES" = "true" ]; then
AGENT_HOSTNAME=$(python /kubernetes_get_host.py)
if [ $? != 0 ]; then
if ! AGENT_HOSTNAME=$(python /kubernetes_get_host.py); then
echo "Error getting hostname from Kubernetes"
return 1
fi
Expand Down

0 comments on commit 38bda1f

Please sign in to comment.