Diff comments:

> diff --git a/debian/cloud-init.config b/debian/cloud-init.config
> index 6e9c6f7..adaabb8 100644
> --- a/debian/cloud-init.config
> +++ b/debian/cloud-init.config
> @@ -32,13 +32,13 @@ hasEc2Md() {
>  get_yaml_list() {
>       # get_yaml_list(file, key, def): return a comma delimited list with the 
> value
>       # for the yaml array defined in 'key' from 'file'. if not found , 
> return 'def'
> -     # only really supports 'key: [en1, en2 ]' format.
> +     # only really supports 'key: [ en1, en2 ]' or 'key: [en1, en2]' formats.
>       local file="$1" key="$2" default="$3"
>       [ -f "$file" ] || return 1
> -     # any thing that didn't match the key is deleted so the final 'p' only
> -     # prints things that matched.
> -     RET=$(sed -n -e "/^$key:/"'!'d -e "s/$key:[ \[]*//"\
> -             -e "s, \]$,," -e p "$file")
> +     # strip all whitespace, delete lines not matching key:,
> +     # strip key: and [] and replace ',' with ', '
> +     RET=$(sed -e "s/\s//g" -e "/^$key:/"'!'d\
> +               -e "s/$key:\[//;s/]//;s/,/, /g" $file)

the combination of multiple '-e' and ';' inside a single '-e' is odd.

>       [ -n "$RET" ] || RET="$default"
>  }
>  


-- 
https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/371919
Your team cloud-init commiters is requested to review the proposed merge of 
~raharper/cloud-init:fix/debian-config-yaml-spaces into cloud-init:ubuntu/devel.

_______________________________________________
Mailing list: https://launchpad.net/~cloud-init-dev
Post to     : cloud-init-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~cloud-init-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to