All of lore.kernel.org
 help / color / mirror / Atom feed
* Starting the phosphor-hwmon service from udev rules
@ 2016-11-28 16:31 Matt Spinler
  2016-11-29  1:28 ` Joel Stanley
  2016-11-29  2:42 ` Patrick Williams
  0 siblings, 2 replies; 9+ messages in thread
From: Matt Spinler @ 2016-11-28 16:31 UTC (permalink / raw)
  To: Joel Stanley, OpenBMC Maillist

I am working on a story this sprint to start the phosphor-hwmon service 
from udev rules.  In addition to just starting the service based on a 
device path, I need to be able to communicate to it some threshold 
values, like critical high temps for example.

I have a proposal for the rules at 
https://gerrit.openbmc-project.xyz/#/c/1243/.

It has lines like:

SUBSYSTEM=="hwmon", DEVPATH=="*i2c-3/3-0077/*", ACTION == "add", 
TAG+="systemd", 
ENV{SYSTEMD_WANTS}+="phosphor-hwmon@/sys/class/hwmon/%k.service", 
ENV{ENVFILE}+="/etc/hwmon.d/hwmon-bmp280-3-77.conf"

where the .conf file will contain any threshold values, maybe like 
CRIT=50.  The command line in the unit file would then somehow make a 
udevadm call to pull out the ENVFILE so it can get passed into the 
executable along with the device path.

Is this the recommended way to go about doing this?  Or instead of 
having a separate udev rule for each device, but 1 service file, is it 
better to have 1 udev rule but separate service files?

Thanks

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

end of thread, other threads:[~2016-12-07 22:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-28 16:31 Starting the phosphor-hwmon service from udev rules Matt Spinler
2016-11-29  1:28 ` Joel Stanley
2016-11-29  2:39   ` Patrick Williams
2016-11-29  2:42 ` Patrick Williams
2016-11-29 16:30   ` Matt Spinler
2016-11-30  1:14     ` Andrew Jeffery
2016-11-30  2:19     ` Patrick Williams
2016-12-07 19:44       ` Matt Spinler
2016-12-07 22:38         ` Patrick Williams

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.