summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/initrdscripts
diff options
context:
space:
mode:
authorZev Weiss <zev@bewilderbeest.net>2023-04-19 01:56:22 +0300
committerZev Weiss <zev@bewilderbeest.net>2023-04-19 02:01:32 +0300
commitf307a2f0f79c8a21696e0e89f7029a4ef4938896 (patch)
tree4a54d1f1347a87dda5e7758f785703f8cb724801 /meta-phosphor/recipes-phosphor/initrdscripts
parent60b329f7cbc81e6e5940e36834481553ea8a91e7 (diff)
downloadopenbmc-f307a2f0f79c8a21696e0e89f7029a4ef4938896.tar.xz
meta-phosphor: phosphor-mmc-init: fix multi-word variable expansion
The $gpiopresent expansion needs to be unquoted, because gpioget needs to take the gpiochip and line number (both of which gpiofind produces) as separate arguments. Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: Iaa5943cf247e523a9c901325ce2290a4f537a50f
Diffstat (limited to 'meta-phosphor/recipes-phosphor/initrdscripts')
-rw-r--r--meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh
index cc1c0dda5c..12cf53a228 100644
--- a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh
+++ b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh
@@ -63,7 +63,10 @@ fi
mkdir -p /var/lock
resetval=$(fw_printenv -n rwreset 2>/dev/null)
if gpiopresent=$(gpiofind factory-reset-toggle) ; then
- gpioval=$(gpioget "$gpiopresent")
+ # gpiopresent contains both the gpiochip and line number as
+ # separate words, and gpioget needs to see them as such.
+ # shellcheck disable=SC2086
+ gpioval=$(gpioget $gpiopresent)
else
gpioval=""
fi