Browse Source

fix the username/password logic

Kenneth Giusti 3 years ago
parent
commit
54a6184d42
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      devstack/plugin.sh

+ 7
- 7
devstack/plugin.sh View File

@@ -91,7 +91,7 @@ function _configure_qpid {
91 91
     echo "acl-file=$qpid_acl_file" | sudo tee --append $qpid_conf_file
92 92
 
93 93
     sudo sed -i '/^auth=/d' $qpid_conf_file
94
-    if [ -z "$QPID_USERNAME" ]; then
94
+    if [ -z "$AMQP1_USERNAME" ]; then
95 95
         # no QPID user configured, so disable authentication
96 96
         # and access control
97 97
         echo "auth=no" | sudo tee --append $qpid_conf_file
@@ -100,14 +100,14 @@ acl allow all all
100 100
 EOF
101 101
     else
102 102
         # Configure qpidd to use PLAIN authentication, and add
103
-        # QPID_USERNAME to the ACL:
103
+        # AMQP1_USERNAME to the ACL:
104 104
         echo "auth=yes" | sudo tee --append $qpid_conf_file
105
-        if [ -z "$QPID_PASSWORD" ]; then
106
-            read_password QPID_PASSWORD "ENTER A PASSWORD FOR QPID USER $QPID_USERNAME"
105
+        if [ -z "$AMQP1_PASSWORD" ]; then
106
+            read_password AMQP1_PASSWORD "ENTER A PASSWORD FOR QPID USER $AMQP1_USERNAME"
107 107
         fi
108
-        # Create ACL to allow $QPID_USERNAME full access
108
+        # Create ACL to allow $AMQP1_USERNAME full access
109 109
         cat <<EOF | sudo tee $qpid_acl_file
110
-group admin ${QPID_USERNAME}@QPID
110
+group admin ${AMQP1_USERNAME}@QPID
111 111
 acl allow admin all
112 112
 acl deny all all
113 113
 EOF
@@ -118,7 +118,7 @@ EOF
118 118
         if [ ! -e $sasl_db ]; then
119 119
             sudo mkdir -p -m 755 `dirname $sasl_db`
120 120
         fi
121
-        echo $QPID_PASSWORD | sudo saslpasswd2 -c -p -f $sasl_db -u QPID $QPID_USERNAME
121
+        echo $AMQP1_PASSWORD | sudo saslpasswd2 -c -p -f $sasl_db -u QPID $AMQP1_USERNAME
122 122
         sudo chmod o+r $sasl_db
123 123
     fi
124 124
 

Loading…
Cancel
Save