← Back to team overview

cloud-init-dev team mailing list archive

Re: [Merge] ~smoser/cloud-init:cleanup/ds-identify-shellcheck-fixes into cloud-init:master

 

LGTM, some nits inline.

Diff comments:

> diff --git a/tools/ds-identify b/tools/ds-identify
> index 7fff5d1..526db42 100755
> --- a/tools/ds-identify
> +++ b/tools/ds-identify
> @@ -343,6 +347,7 @@ read_uname_info() {
>      DI_UNAME_MACHINE="$1"
>      DI_UNAME_OPERATING_SYSTEM="$2"
>      DI_UNAME_CMD_OUT="$out"
> +

shellcheck complains about whitespace?

>      return 0
>  }
>  
> @@ -1314,15 +1326,15 @@ manual_clean_and_existing() {
>  }
>  
>  read_uptime() {
> -    local up idle
> +    local up _
>      _RET="${UNAVAILABLE}"
> -    [ -f "$PATH_PROC_UPTIME" ] &&
> -        read up idle < "$PATH_PROC_UPTIME" && _RET="$up"
> +    [ -f "$PATH_PROC_UPTIME" ] && read up _ < "$PATH_PROC_UPTIME" &&

can we use _idle ?  That keeps the value documented.

> +        _RET="$up"
>      return
>  }
>  
>  _main() {
> -    local dscheck="" ret_dis=1 ret_en=0
> +    local dscheck_fn="" ret_dis=1 ret_en=0
>  
>      read_uptime
>      debug 1 "[up ${_RET}s]" "ds-identify $*"


-- 
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/344768
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:cleanup/ds-identify-shellcheck-fixes into cloud-init:master.


References