Browse code

Merge pull request #158 from chmouel/swift-shush-question-if-not-needed

As discussed via skype, only ask for swift_hash when needed.

sleepsonthefloor authored on 2011/11/04 00:51:13
Showing 1 changed files
... ...
@@ -313,9 +313,13 @@ SWIFT_LOOPBACK_DISK_SIZE=${SWIFT_LOOPBACK_DISK_SIZE:-1000000}
313 313
 # By default we define 9 for the partition count (which mean 512).
314 314
 SWIFT_PARTITION_POWER_SIZE=${SWIFT_PARTITION_POWER_SIZE:-9}
315 315
 
316
-# SWIFT_HASH is a random unique string for a swift cluster that can never change.
317
-read_password SWIFT_HASH "ENTER A RANDOM SWIFT HASH."
318
-
316
+# We only ask for Swift Hash if we have enabled swift service.
317
+if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
318
+    # SWIFT_HASH is a random unique string for a swift cluster that
319
+    # can never change.
320
+    read_password SWIFT_HASH "ENTER A RANDOM SWIFT HASH."
321
+fi
322
+    
319 323
 # Keystone
320 324
 # --------
321 325