From 32b21ee7245bf00d55f875506ffc149aad9bb546 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 28 Mar 2017 14:27:33 -0400 Subject: ds-identify: do not write None twice to datasource_list. If the only the None datasource was listed in datasource_list, then ds-identify would write a cloud.cfg witih: datasource_list: [None, None] The fix is to just append None if the list only has None. --- tools/ds-identify | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/ds-identify b/tools/ds-identify index 30106347..54bd9999 100755 --- a/tools/ds-identify +++ b/tools/ds-identify @@ -954,7 +954,9 @@ found() { shift fi # always write the None datasource last. - list="${list:+${list}, }None" + if [ "$list" != "None" ]; then + list="${list:+${list}, }None" + fi write_result "datasource_list: [ $list ]" "$@" return } -- cgit v1.2.3