diff --git a/fanatic b/fanatic index 8366881..5a83ad1 100755 --- a/fanatic +++ b/fanatic @@ -142,7 +142,11 @@ enable_fan() # fi progress "configuring fan underlay:$underlay overlay:$overlay" twiddle_fan_config add "$device" "$overlay" "$underlay" - fanctl up -o "$overlay" -u "$underlay" --auto || fail "unable to bring fan up, unable to configure" + if ! fanctl up -o "$overlay" -u "$underlay" --auto; then + twiddle_fan_config remove "$device" "$overlay" \ + "$underlay" + fail "unable to bring fan up, unable to configure" + fi fi }
diff --git a/fanatic b/fanatic fan_config add "$device" "$overlay" "$underlay"
index 8366881..5a83ad1 100755
--- a/fanatic
+++ b/fanatic
@@ -142,7 +142,11 @@ enable_fan()
# fi
progress "configuring fan underlay:$underlay overlay:$overlay"
twiddle_
- fanctl up -o "$overlay" -u "$underlay" --auto || fail "unable to bring fan up, unable to configure"
+ if ! fanctl up -o "$overlay" -u "$underlay" --auto; then
+ twiddle_fan_config remove "$device" "$overlay" \
+ "$underlay"
+ fail "unable to bring fan up, unable to configure"
+ fi
fi
}