commit c31c42aaaf59aac9ef04304ed01b7ff7b3eaab41 parent 458bbd6e622c6f459631a24f3301cfb01429cb7c Author: Jan Pobrislo <ccx@webprojekty.cz> Date: Mon, 20 Nov 2017 15:56:55 +0100 Fix found device check condition. Diffstat:
| M | zsh-functions/confz_fs_init | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/zsh-functions/confz_fs_init b/zsh-functions/confz_fs_init @@ -140,7 +140,8 @@ confz_disk_id_check() { done (( $#found )) || die "$0: found no matching devices" - [[ $#found != 3 ]] || die "$0: found too many matching devices" + (( $#found % 3 )) && die "$0: internal error parsing device information" + [[ $#found -ne 3 ]] && die "$0: found too many matching devices" vars[device]=$found[0] vars[device_model]=$found[1] vars[serial_number]=$found[2]