From cff1335be979fd1be5512d241ab861cfe70d82f0 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 24 Feb 2017 22:42:50 -0500 Subject: tools/ds-identify: use quotes in local declarations. The following can have cause issue: FOO="bar ; wark" showit() { local b=$FOO echo $b } 4: local: ;: bad variable name The answer is just to use more quotes. --- tools/ds-identify | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/ds-identify') diff --git a/tools/ds-identify b/tools/ds-identify index 9b14b92a..f2878745 100755 --- a/tools/ds-identify +++ b/tools/ds-identify @@ -601,7 +601,7 @@ dscheck_Ec2() { fi # product uuid and product serial start with case insensitive - local uuid=${DI_DMI_PRODUCT_UUID} serial=${DI_DMI_PRODUCT_SERIAL} + local uuid="${DI_DMI_PRODUCT_UUID}" serial="${DI_DMI_PRODUCT_SERIAL}" case "$uuid:$serial" in [Ee][Cc]2*:[Ee][Cc]2) # both start with ec2, now check for case insenstive equal @@ -883,7 +883,7 @@ parse_policy() { } read_config() { - local config=${PATH_DI_CONFIG} + local config="${PATH_DI_CONFIG}" local _rc_dsname="" _rc_policy="" ret="" if [ -f "$config" ]; then _read_config < "$config" -- cgit v1.2.3