All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Ferland <ferlandm@sonatest.com>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH] fancontrol: Fix handling of absolute paths in config
Date: Fri, 22 Mar 2013 17:51:30 +0000	[thread overview]
Message-ID: <87obebb9wd.fsf@sonatest.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 98 bytes --]

The following patch fixes the fancontrol script so it can handle
absolute filenames again.

Marc


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 849 bytes --]

Index: prog/pwm/fancontrol
===================================================================
--- prog/pwm/fancontrol	(revision 6127)
+++ prog/pwm/fancontrol	(working copy)
@@ -289,16 +289,19 @@
 cd $DIR
 
 # Check for configuration change
-if [ -z "$DEVPATH" -o -z "$DEVNAME" ]
+if [ "$DIR" != "/" ]
 then
-	echo "Configuration is too old, please run pwmconfig again" >&2
-	exit 1
+	if [ -z "$DEVPATH" -o -z "$DEVNAME" ]
+	then
+		echo "Configuration is too old, please run pwmconfig again" >&2
+		exit 1
+	fi
+	if ! ValidateDevices "$DEVPATH" "$DEVNAME"
+	then
+		echo "Configuration appears to be outdated, please run pwmconfig again" >&2
+		exit 1
+	fi
 fi
-if ! ValidateDevices "$DEVPATH" "$DEVNAME"
-then
-	echo "Configuration appears to be outdated, please run pwmconfig again" >&2
-	exit 1
-fi
 CheckFiles || exit 1
 
 if [ -f "$PIDFILE" ]

[-- Attachment #3: Type: text/plain, Size: 153 bytes --]

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

             reply	other threads:[~2013-03-22 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 17:51 Marc Ferland [this message]
2013-05-21  8:23 ` [lm-sensors] [PATCH] fancontrol: Fix handling of absolute paths in config Jean Delvare
2013-05-23 13:42 ` Marc Ferland
2013-05-23 14:18 ` Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87obebb9wd.fsf@sonatest.com \
    --to=ferlandm@sonatest.com \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.