From 1ca2f99608c109f23461e179ec08d8f52809dcbf Mon Sep 17 00:00:00 2001 From: coolneng Date: Mon, 2 Jan 2023 12:41:43 +0100 Subject: [PATCH] Remove deadlock due to PWM being already exported --- scripts/SATA-hat.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/SATA-hat.sh b/scripts/SATA-hat.sh index abf44a2..fd652d4 100755 --- a/scripts/SATA-hat.sh +++ b/scripts/SATA-hat.sh @@ -42,9 +42,10 @@ enable_pwm_channel() { } set_pwm() { - enable_pwm_channel 1 if [ "$1" = "clean" ]; then echo 1 >$PWM_PATH/unexport + else + enable_pwm_channel 1 fi }