All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] PATCH: make lm_sensors init script return values LSB
@ 2008-02-11 12:04 Hans de Goede
  2008-02-13 11:31 ` [lm-sensors] PATCH: make lm_sensors init script return values Jean Delvare
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Hans de Goede @ 2008-02-11 12:04 UTC (permalink / raw)
  To: lm-sensors

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

Hi All,

I've received the attached patch through Fedora's bugzilla. It fixes the return 
values of the various error exit cases to match the LSB spec:
http://refspecs.linux-foundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

It looks sane to me, if there are no objections I'll commit it to svn.

Thanks & Regards,

Hans


[-- Attachment #2: lm_sensors-lsb-retcode.diff --]
[-- Type: text/x-patch, Size: 827 bytes --]

--- lm_sensors.orig	2008-02-07 11:37:22.000000000 -0500
+++ lm_sensors	2008-02-07 11:41:04.000000000 -0500
@@ -40,15 +40,15 @@
 
 	# Don't bother if /proc/sensors still doesn't exist, kernel doesn't have
 	# support for sensors.
-	[ -e /proc/sys/dev/sensors ] || exit 0
+	[ -e /proc/sys/dev/sensors ] || exit 6
 
 	# If sensors was not already running, unload the module...
 	[ -e /var/lock/subsys/lm_sensors ] || /sbin/modprobe -r i2c-proc >/dev/null 2>&1
 fi
 
 CONFIG=/etc/sysconfig/lm_sensors
-[ -r "$CONFIG" ] || exit 0
-grep '^MODULE_' $CONFIG >/dev/null 2>&1 || exit 0
+[ -r "$CONFIG" ] || exit 6
+grep '^MODULE_' $CONFIG >/dev/null 2>&1 || exit 6
 
 # Load config file
 . "$CONFIG"
@@ -147,7 +147,7 @@
 	;;
   *)
 	echo "Usage: $0 {start|stop|status|restart|reload|condrestart}"
-	exit 1
+	exit 3
 esac
 
 exit $RETVAL

[-- 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] 5+ messages in thread

end of thread, other threads:[~2008-02-26 13:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 12:04 [lm-sensors] PATCH: make lm_sensors init script return values LSB Hans de Goede
2008-02-13 11:31 ` [lm-sensors] PATCH: make lm_sensors init script return values Jean Delvare
2008-02-13 12:07 ` Hans de Goede
2008-02-13 12:27 ` Jean Delvare
2008-02-26 13:44 ` Hans de Goede

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.