From 5e2e1fff53ec1cef408b22dc966db133d34a699b Mon Sep 17 00:00:00 2001 From: Michal Pomorski Date: Thu, 10 Feb 2022 02:01:30 +0100 Subject: [PATCH] Deal with relative paths for the config file. --- prog/pwm/pwmconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/prog/pwm/pwmconfig b/prog/pwm/pwmconfig index edcbde9e..e4f05131 100755 --- a/prog/pwm/pwmconfig +++ b/prog/pwm/pwmconfig @@ -31,6 +31,7 @@ LM_VERSION='3.6.0+git' PIDFILE="/var/run/fancontrol.pid" +USERDIR=$(pwd) if [ -f "$PIDFILE" ] then @@ -614,6 +615,10 @@ function AskPath() then FCCONFIG="/etc/fancontrol" fi + if [ ${FCCONFIG::1} != "/" ] + then + FCCONFIG=$(readlink -f $USERDIR/$FCCONFIG) + fi } AskPath