Skip to content

Commit 45e2d97

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Clean up local variable usage - Horizon"
2 parents 3a2837a + 1bbfcc7 commit 45e2d97

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lib/horizon

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function _horizon_config_set {
5050
sed -e "/^$option/d" -i $local_settings
5151
echo -e "\n$option=$value" >> $file
5252
elif grep -q "^$section" $file; then
53-
line=$(sed -ne "/^$section/,/^}/ { /^ *'$option':/ p; }" $file)
53+
local line=$(sed -ne "/^$section/,/^}/ { /^ *'$option':/ p; }" $file)
5454
if [ -n "$line" ]; then
5555
sed -i -e "/^$section/,/^}/ s/^\( *'$option'\) *:.*$/\1: $value,/" $file
5656
else
@@ -89,7 +89,7 @@ function configure_horizon {
8989
# init_horizon() - Initialize databases, etc.
9090
function init_horizon {
9191
# ``local_settings.py`` is used to override horizon default settings.
92-
local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py
92+
local local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py
9393
cp $HORIZON_SETTINGS $local_settings
9494

9595
if is_service_enabled neutron; then
@@ -121,9 +121,9 @@ function init_horizon {
121121
sudo mkdir -p $HORIZON_DIR/.blackhole
122122

123123
# Apache 2.4 uses mod_authz_host for access control now (instead of "Allow")
124-
HORIZON_REQUIRE=''
124+
local horizon_require=''
125125
if check_apache_version "2.4" ; then
126-
HORIZON_REQUIRE='Require all granted'
126+
horizon_require='Require all granted'
127127
fi
128128

129129
local horizon_conf=$(apache_site_config_for horizon)
@@ -135,7 +135,7 @@ function init_horizon {
135135
s,%HORIZON_DIR%,$HORIZON_DIR,g;
136136
s,%APACHE_NAME%,$APACHE_NAME,g;
137137
s,%DEST%,$DEST,g;
138-
s,%HORIZON_REQUIRE%,$HORIZON_REQUIRE,g;
138+
s,%HORIZON_REQUIRE%,$horizon_require,g;
139139
\" $FILES/apache-horizon.template >$horizon_conf"
140140

141141
if is_ubuntu; then

0 commit comments

Comments
 (0)