cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #04218
Re: [Merge] ~smoser/cloud-init:bug/ds-identify-fix-parse-blkid-export into cloud-init:master
Thanks Scott for fixing this. One minor comment.
Diff comments:
> diff --git a/tools/ds-identify b/tools/ds-identify
> index 5f76243..167a85c 100755
> --- a/tools/ds-identify
> +++ b/tools/ds-identify
> @@ -203,21 +204,26 @@ read_fs_info() {
> DI_ISO9660_DEVS="$UNAVAILABLE:error"
> return $ret
> }
> - IFS="$CR"
> - set -- $out
> - IFS="$oifs"
> - for line in "$@" ""; do
> + # 'set --' will collapse multiple consective entries in IFS for
s/consective/consecutive/
> + # whitespace characters (\n, tab, " ") so we cannot rely on getting
> + # empty lines in "$@" below.
> + IFS="$CR"; set -- $out; IFS="$oifs"
> +
> + for line in "$@"; do
> case "${line}" in
> - DEVNAME=*) dev=${line#DEVNAME=};;
> + DEVNAME=*)
> + [ -n "$dev" -a "$ftype" = "iso9660" ] &&
> + isodevs="${isodevs} ${dev}=$label"
> + ftype=""; dev=""; label="";
> + dev=${line#DEVNAME=};;
> LABEL=*) label="${line#LABEL=}";
> labels="${labels}${line#LABEL=}${delim}";;
> TYPE=*) ftype=${line#TYPE=};;
> - "") if [ "$ftype" = "iso9660" ]; then
> - isodevs="${isodevs} ${dev}=$label"
> - fi
> - ftype=""; devname=""; label="";
> esac
> done
> + [ -n "$dev" -a "$ftype" = "iso9660" ] &&
> + isodevs="${isodevs} ${dev}=$label"
> +
> DI_FS_LABELS="${labels%${delim}}"
> DI_ISO9660_DEVS="${isodevs# }"
> }
--
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/338470
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:bug/ds-identify-fix-parse-blkid-export into cloud-init:master.
References