Revision dde9cf31 src/datastore_mad/remotes/ceph/export

View differences:

src/datastore_mad/remotes/ceph/export
77 77
fi
78 78

  
79 79
IMPORT_SOURCE="rbd://$DST_HOST/$SRC"
80
IS_JOIN="?"
80 81

  
81 82
if [ -n "$CEPH_USER" ]; then
82 83
    RBD="$RBD --id ${CEPH_USER}"
83
    IMPORT_SOURCE="${IMPORT_SOURCE}?CEPH_USER=${CEPH_USER}"
84
    IMPORT_SOURCE="${IMPORT_SOURCE}${IS_JOIN}CEPH_USER=${CEPH_USER}"
85
    IS_JOIN="&"
84 86
fi
85 87

  
86 88
if [ -n "$CEPH_KEY" ]; then
87 89
    RBD="$RBD --keyfile ${CEPH_USER}"
88
    IMPORT_SOURCE="${IMPORT_SOURCE}?CEPH_USER=${CEPH_USER}?CEPH_KEY=${CEPH_KEY}?"
90
    IMPORT_SOURCE="${IMPORT_SOURCE}${IS_JOIN}CEPH_KEY=${CEPH_KEY}"
91
    IS_JOIN="&"
89 92
fi
90 93

  
91 94
if [ -n "$CEPH_CONF" ]; then
92 95
    RBD="$RBD --conf ${CEPH_CONF}"
93

  
94
    if [ -n "$CEPH_USER" ]; then
95
        IMPORT_SOURCE="${IMPORT_SOURCE}&"
96
    elif [ -n "$CEPH_KEY" ]; then
97
        IMPORT_SOURCE="${IMPORT_SOURCE}&"
98
    else
99
        IMPORT_SOURCE="${IMPORT_SOURCE}?"
100
    fi
101

  
102
    IMPORT_SOURCE="${IMPORT_SOURCE}CEPH_CONF=${CEPH_CONF}"
96
    IMPORT_SOURCE="${IMPORT_SOURCE}${IS_JOIN}CEPH_CONF=${CEPH_CONF}"
103 97
fi
104 98

  
105 99
#-------------------------------------------------------------------------------

Also available in: Unified diff