Browse code

Merge "Remove usage of $[ for arithmetic, take 2"

Jenkins authored on 2014/10/28 11:05:39
Showing 1 changed files
... ...
@@ -196,9 +196,9 @@ function _config_swift_apache_wsgi {
196 196
     # copy apache vhost file and set name and port
197 197
     local node_number
198 198
     for node_number in ${SWIFT_REPLICAS_SEQ}; do
199
-        local object_port=$[OBJECT_PORT_BASE + 10 * ($node_number - 1)]
200
-        local container_port=$[CONTAINER_PORT_BASE + 10 * ($node_number - 1)]
201
-        local account_port=$[ACCOUNT_PORT_BASE + 10 * ($node_number - 1)]
199
+        local object_port=$(( OBJECT_PORT_BASE + 10 * (node_number - 1) ))
200
+        local container_port=$(( CONTAINER_PORT_BASE + 10 * (node_number - 1) ))
201
+        local account_port=$(( ACCOUNT_PORT_BASE + 10 * (node_number - 1) ))
202 202
 
203 203
         sudo cp ${SWIFT_DIR}/examples/apache2/object-server.template $(apache_site_config_for object-server-${node_number})
204 204
         sudo sed -e "
... ...
@@ -257,7 +257,7 @@ function generate_swift_config_services {
257 257
     local bind_port=$3
258 258
     local server_type=$4
259 259
 
260
-    log_facility=$[ node_id - 1 ]
260
+    log_facility=$(( node_id - 1 ))
261 261
     local node_path=${SWIFT_DATA_DIR}/${node_number}
262 262
 
263 263
     iniuncomment ${swift_node_config} DEFAULT user