tegra-flash-init: quote configuration state when testing

The configuration state could be 'not attached', which confuses
the shell unless we quote it.

Signed-off-by: Matt Madison <matt@madison.systems>
This commit is contained in:
Matt Madison
2024-09-14 06:00:02 -07:00
parent fa83834fdc
commit 98e065a4d9

View File

@@ -84,7 +84,7 @@ wait_for_connect() {
echo -n "Waiting for host to connect..."
while true; do
configured=$(cat /sys/class/udc/$UDC/state)
if [ $configured = "configured" ]; then
if [ "$configured" = "configured" ]; then
echo "[connected]"
break
fi
@@ -104,7 +104,7 @@ wait_for_disconnect() {
echo -n "Waiting for host to disconnect..."
while true; do
configured=$(cat /sys/class/udc/$UDC/state)
if [ $configured != "configured" ]; then
if [ "$configured" != "configured" ]; then
echo "[disconnected]"
break
fi