Skip to content

Commit c6fd4cd

Browse files
committed
chore: shell style
1 parent 2291d4a commit c6fd4cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shutdowncheck.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ elif [ -e /sys/class/gpio/export ]; then
173173
#ATXRaspi (GPIO7 to become HIGH), and issues a shutdown when that happens.
174174
#It sleeps as long as that has not happened.
175175
while true; do
176-
shutdownSignal=$(cat /sys/class/gpio/gpio$SHUTDOWN/value)
176+
shutdownSignal="$(cat "/sys/class/gpio/gpio${SHUTDOWN}/value")"
177177
if [ "$shutdownSignal" = 0 ]; then
178178
sleep 0.2
179179
else
@@ -185,7 +185,7 @@ elif [ -e /sys/class/gpio/export ]; then
185185
handle_press poweroff
186186
return
187187
fi
188-
shutdownSignal=$(cat /sys/class/gpio/gpio$SHUTDOWN/value)
188+
shutdownSignal="$(cat "/sys/class/gpio/gpio${SHUTDOWN}/value")"
189189
done
190190
#pulse went LOW, check if it was long enough, and trigger reboot
191191
if [ "$(( "$(date +%s%N)" - pulseStart ))" -gt "$REBOOTPULSEMINIMUM" ]; then

0 commit comments

Comments
 (0)