All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH] fancontrol: Fix handling of absolute paths in config
@ 2013-03-22 17:51 Marc Ferland
  2013-05-21  8:23 ` Jean Delvare
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Marc Ferland @ 2013-03-22 17:51 UTC (permalink / raw)
  To: lm-sensors

[-- 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-23 14:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-22 17:51 [lm-sensors] [PATCH] fancontrol: Fix handling of absolute paths in config Marc Ferland
2013-05-21  8:23 ` Jean Delvare
2013-05-23 13:42 ` Marc Ferland
2013-05-23 14:18 ` Jean Delvare

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.