fancontrol: Add --check option to only check configuration syntax

References: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=582979
This commit is contained in:
Aurelien Jarno authored and Michal Suchánek committed 2024-02-17 12:41:20 +01:00
1 parent 5f35944bc4
commit c2df8a4183
1 file changed
+11
+11
View File
@@ -390,6 +390,17 @@ function CheckFiles
return $outdated
}
if [ "$1" == "--check" ]
then
if [ -f "$2" ]
then
LoadConfig $2
else
LoadConfig /etc/fancontrol
fi
exit 0
fi
if [ -f "$1" ]
then
LoadConfig $1