=== modified file 'src/lib/cirros/ds/configdrive' --- src/lib/cirros/ds/configdrive 2013-05-12 01:37:38 +0000 +++ src/lib/cirros/ds/configdrive 2016-07-04 09:30:33 +0000 @@ -4,6 +4,7 @@ CONFIG=/etc/cirros-init/configdrive NAME="${0##*/}" LABEL="config-2" +LABEL_ALT="CONFIG-2" SEED_PRE_D="/var/lib/cloud/seed/configdrive-pre" SEED_POST_D="/var/lib/cloud/seed/configdrive" @@ -22,11 +23,19 @@ local out_d="$1" local devlist="" num="" found="" fstree_d="" local raw_d="" dev="" rdir="" mdjson="" ud="" found="" - find_devs_with "LABEL=$LABEL" || - { error "failed to find devs"; return 1; } - - devlist=${_RET} - [ -n "$devlist" ] || { debug 1 "no devices labeled $LABEL"; exit 0; } + + # according to the spec the label should be in lower case, but some + # dosfstools versions will produce an upper case value no matter what. + # Try both to account for that case (e.g. on RHEL 7.x) + for label in $LABEL $LABEL_ALT; do + find_devs_with "LABEL=$label" || + { error "failed to find devs"; return 1; } + + devlist=${_RET} + [ -n "$devlist" ] && break || { debug 1 "no devices labeled $label"; continue; } + done + + [ -n "$devlist" ] || { debug 1 "config drive device not found"; exit 0; } if [ -d "${SEED_PRE_D}" ]; then devlist="$SEED_PRE_D $devlist"